]> Sergey Matveev's repositories - public-inbox.git/blob - lib/PublicInbox/LeiForgetMailSync.pm
ds: support greeting protocols
[public-inbox.git] / lib / PublicInbox / LeiForgetMailSync.pm
1 # Copyright (C) 2021 all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
3
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
8 # sufficient.
9
10 package PublicInbox::LeiForgetMailSync;
11 use strict;
12 use v5.10.1;
13 use PublicInbox::LeiRefreshMailSync;
14
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);
21 }
22
23 *_complete_forget_mail_sync =
24         \&PublicInbox::LeiRefreshMailSync::_complete_refresh_mail_sync;
25
26 1;