fix(spam): use correct mailbox ID when moving emails out of junk

This commit is contained in:
Matthieu MALVACHE
2026-02-25 16:14:05 +01:00
committed by Matthieu MALVACHE
parent 08ee6b6932
commit 110dd98ad4
2 changed files with 318 additions and 672 deletions
+316 -670
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -918,7 +918,7 @@ export const useEmailStore = create<EmailStore>((set, get) => ({
throw new Error('Inbox not found'); throw new Error('Inbox not found');
} }
targetMailboxId = inboxMailbox.id; targetMailboxId = inboxMailbox.originalId || inboxMailbox.id;
} }
try { try {
@@ -970,7 +970,7 @@ export const useEmailStore = create<EmailStore>((set, get) => ({
try { try {
for (const emailId of emailIds) { for (const emailId of emailIds) {
await client.undoSpam(emailId, inboxMailbox.id, accountId); await client.undoSpam(emailId, inboxMailbox.originalId || inboxMailbox.id, accountId);
} }
set(state => ({ set(state => ({