fix(jmap): poll ContactCard/FileNode state too, not just Mailbox/Email/Calendar
The mail-index's event-driven reindex depends on this poll to notice contacts/files changes when SSE/WS isn't available - found during the mail-index build's push-wiring investigation (the WS/SSE transport is already type-generic, but this poll fallback wasn't). Mirrors the existing Calendar branch exactly, same accountId resolution pattern. Confirmed the one pre-existing test failure this touches (jmap-client-resilience) is flaky independent of this change - ran the full suite twice with this edit stashed out, got 3 failed then 2 failed with no edit present.
This commit is contained in:
@@ -6071,6 +6071,8 @@ export class JMAPClient implements IJMAPClient {
|
|||||||
'Calendar/get': 'Calendar',
|
'Calendar/get': 'Calendar',
|
||||||
'CalendarEvent/get': 'CalendarEvent',
|
'CalendarEvent/get': 'CalendarEvent',
|
||||||
'SieveScript/get': 'SieveScript',
|
'SieveScript/get': 'SieveScript',
|
||||||
|
'ContactCard/get': 'ContactCard',
|
||||||
|
'FileNode/get': 'FileNode',
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly POLLING_INTERVAL = 3_000;
|
private static readonly POLLING_INTERVAL = 3_000;
|
||||||
@@ -6588,6 +6590,23 @@ export class JMAPClient implements IJMAPClient {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Contacts and files get no push at all today (mail-index's event-driven
|
||||||
|
// reindex depends on this poll to notice them when SSE/WS isn't
|
||||||
|
// available) - mirrors the Calendar branch above, same accountId caveat.
|
||||||
|
if (this.supportsContacts()) {
|
||||||
|
using.push('urn:ietf:params:jmap:contacts');
|
||||||
|
methodCalls.push(
|
||||||
|
['ContactCard/get', { accountId: this.getContactsAccountId(), ids: [], properties: ['id'] }, 'f'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.hasCapability('urn:ietf:params:jmap:filenode')) {
|
||||||
|
using.push('urn:ietf:params:jmap:filenode');
|
||||||
|
methodCalls.push(
|
||||||
|
['FileNode/get', { accountId: this.getFilesAccountId(), ids: [], properties: ['id'] }, 'g'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return { using, methodCalls };
|
return { using, methodCalls };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user