diff options
author | Eric Wong <e@80x24.org> | 2021-05-03 20:57:31 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-05-04 02:35:34 +0000 |
commit | d98abf13946beaf685804e4ec2d79019129415b9 (patch) | |
tree | ce554cf307a0b56f07a1b1c95e50a000272a0254 /lib/PublicInbox/LeiToMail.pm | |
parent | e77f38470abdd0f4df8c2469c36f17188f0df64c (diff) | |
download | public-inbox-d98abf13946beaf685804e4ec2d79019129415b9.tar.gz |
LeiToMail Maildir and IMAP write callbacks need to account for the caller-supplied smsg. We'll also make better use of the user-supplied smsg object by ensuring blob deduplication happens ASAP. Fixes: e76683309ca4f254 ("lei <q|up>: distinguish between mset and l2m counts")
Diffstat (limited to 'lib/PublicInbox/LeiToMail.pm')
-rw-r--r-- | lib/PublicInbox/LeiToMail.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm index 71acf952..64061788 100644 --- a/lib/PublicInbox/LeiToMail.pm +++ b/lib/PublicInbox/LeiToMail.pm @@ -283,7 +283,8 @@ sub _maildir_write_cb ($$) { my ($bref, $smsg, $eml) = @_; $dst // return $lei->fail; # dst may be undef-ed in last run return if $dedupe && $dedupe->is_dup($eml // - PublicInbox::Eml->new($$bref)); + PublicInbox::Eml->new($$bref), + $smsg); $lse->xsmsg_vmd($smsg) if $lse; my $n = _buf2maildir($dst, $bref // \($eml->as_string), $smsg); $sto->ipc_do('set_sync_info', $smsg->{blob}, $out, $n) if $sto; @@ -305,7 +306,8 @@ sub _imap_write_cb ($$) { my ($bref, $smsg, $eml) = @_; $mic // return $lei->fail; # mic may be undef-ed in last run return if $dedupe && $dedupe->is_dup($eml // - PublicInbox::Eml->new($$bref)); + PublicInbox::Eml->new($$bref), + $smsg); $lse->xsmsg_vmd($smsg) if $lse; my $uid = eval { $append->($mic, $folder, $bref, $smsg, $eml) }; if (my $err = $@) { |