Only perform email ingest duplicate check on the target mailbox (#632)

This commit is contained in:
mdecimus 2024-08-03 09:10:41 +02:00
parent 9cb87091e1
commit b47d57e3c3

View file

@ -158,7 +158,13 @@ impl JMAP {
.filter(
params.account_id,
Collection::Email,
vec![Filter::eq(Property::MessageId, message_id)],
vec![
Filter::eq(Property::MessageId, message_id),
Filter::is_in_bitmap(
Property::MailboxIds,
params.mailbox_ids.first().copied().unwrap_or(INBOX_ID),
),
],
)
.await
.caused_by(trc::location!())?