diff --git a/lib/jmap/client.ts b/lib/jmap/client.ts index f7c88a44..16502ccd 100644 --- a/lib/jmap/client.ts +++ b/lib/jmap/client.ts @@ -6071,6 +6071,8 @@ export class JMAPClient implements IJMAPClient { 'Calendar/get': 'Calendar', 'CalendarEvent/get': 'CalendarEvent', 'SieveScript/get': 'SieveScript', + 'ContactCard/get': 'ContactCard', + 'FileNode/get': 'FileNode', }; 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 }; }