public-inbox.git  about / heads / tags
an "archives first" approach to mailing lists
blob 762910ed5712a893a383fedeb0fc096f4e5736b3 775 bytes (raw)
$ git show HEAD:lib/PublicInbox/LeiForgetMailSync.pm	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
# Copyright (C) 2021 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>

# "lei forget-mail-sync" drop synchronization information
# TODO: figure out what to do about "lei index" users having
# dangling references.  Perhaps just documenting "lei index"
# use being incompatible with "forget-mail-sync" use is
# sufficient.

package PublicInbox::LeiForgetMailSync;
use strict;
use v5.10.1;
use PublicInbox::LeiRefreshMailSync;

sub lei_forget_mail_sync {
	my ($lei, @folders) = @_;
	my $lms = $lei->lms or return;
	$lms->lms_write_prepare;
	$lms->arg2folder($lei, \@folders); # may die
	$lms->forget_folders(@folders);
}

*_complete_forget_mail_sync =
	\&PublicInbox::LeiRefreshMailSync::_complete_refresh_mail_sync;

1;

git clone https://public-inbox.org/public-inbox.git
git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/public-inbox.git