fix: update markAsSpam to fetch mailboxes with accountId

This commit is contained in:
Max Hao
2026-06-18 21:38:29 +02:00
committed by Linus Rath
parent 6f615f4c32
commit c9eae3b3a1
+1 -1
View File
@@ -1667,7 +1667,7 @@ export class JMAPClient implements IJMAPClient {
async markAsSpam(emailId: string, accountId?: string, markAsRead?: boolean): Promise<void> {
const targetAccountId = accountId || this.accountId;
const mailboxes = await this.getMailboxes();
const mailboxes = await this.getMailboxes(accountId);
const junkMailbox = mailboxes.find(m => {
if (accountId) {
return m.role === 'junk' && m.accountId === accountId;