fix: update markAsSpam to fetch mailboxes with accountId
This commit is contained in:
+1
-1
@@ -1667,7 +1667,7 @@ export class JMAPClient implements IJMAPClient {
|
|||||||
async markAsSpam(emailId: string, accountId?: string, markAsRead?: boolean): Promise<void> {
|
async markAsSpam(emailId: string, accountId?: string, markAsRead?: boolean): Promise<void> {
|
||||||
const targetAccountId = accountId || this.accountId;
|
const targetAccountId = accountId || this.accountId;
|
||||||
|
|
||||||
const mailboxes = await this.getMailboxes();
|
const mailboxes = await this.getMailboxes(accountId);
|
||||||
const junkMailbox = mailboxes.find(m => {
|
const junkMailbox = mailboxes.find(m => {
|
||||||
if (accountId) {
|
if (accountId) {
|
||||||
return m.role === 'junk' && m.accountId === accountId;
|
return m.role === 'junk' && m.accountId === accountId;
|
||||||
|
|||||||
Reference in New Issue
Block a user