fix(spam): use correct mailbox ID when moving emails out of junk
This commit is contained in:
+316
-670
File diff suppressed because it is too large
Load Diff
@@ -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 => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user