fix: move mail from shared group inbox to personal inbox #375

This commit is contained in:
Linus Rath
2026-06-01 17:39:28 +02:00
parent bc322a1e69
commit c78dbee60b
4 changed files with 29 additions and 15 deletions
+5 -1
View File
@@ -173,7 +173,11 @@ export function useMailboxDrop({ mailbox, onDropComplete, onSuccess, onError }:
// import call to target the owner's JMAP account.
const jmapDestId = mailbox.originalId || mailbox.id;
const destJmapOverride = mailbox.isShared ? mailbox.accountId : undefined;
await crossAccountMoveEmails(bySource, destAccountId, jmapDestId, destJmapOverride);
// Mirror image for the source: a shared group mailbox is accessed
// through the viewing user's client, but the email/blob live in the
// owner's JMAP account, so the copy/delete must target it.
const sourceJmapOverride = sourceMb?.isShared ? sourceMb.accountId : undefined;
await crossAccountMoveEmails(bySource, destAccountId, jmapDestId, destJmapOverride, sourceJmapOverride);
} else {
// Single-account or same-account-shared move: bulk JMAP request.
await moveEmailsToMailbox(client, emailIds, mailbox.id);