1 # Copyright (C) 2021 all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
4 # "lei forget-mail-sync" drop synchronization information
5 # TODO: figure out what to do about "lei index" users having
6 # dangling references. Perhaps just documenting "lei index"
7 # use being incompatible with "forget-mail-sync" use is
10 package PublicInbox::LeiForgetMailSync;
13 use PublicInbox::LeiRefreshMailSync;
15 sub lei_forget_mail_sync {
16 my ($lei, @folders) = @_;
17 my $lms = $lei->lms or return;
18 $lms->lms_write_prepare;
19 $lms->arg2folder($lei, \@folders); # may die
20 $lms->forget_folders(@folders);
23 *_complete_forget_mail_sync =
24 \&PublicInbox::LeiRefreshMailSync::_complete_refresh_mail_sync;