fix: use dynamic batch size for calendar event retrieval

This commit is contained in:
Linus Rath
2026-04-02 23:29:37 +02:00
parent d657bdfa75
commit 050f38b1fa
+2 -2
View File
@@ -3223,7 +3223,7 @@ export class JMAPClient implements IJMAPClient {
async getCalendarEvents(calendarIds?: string[], targetAccountId?: string): Promise<CalendarEvent[]> {
const accountId = targetAccountId || this.getCalendarsAccountId();
const GET_BATCH_SIZE = 500;
const GET_BATCH_SIZE = this.getMaxObjectsInGet();
const queryArgs: Record<string, unknown> = { accountId, limit: 1000 };
if (calendarIds && calendarIds.length > 0) {
@@ -3329,7 +3329,7 @@ export class JMAPClient implements IJMAPClient {
queryArgs.sort = sort;
}
const GET_BATCH_SIZE = 500;
const GET_BATCH_SIZE = this.getMaxObjectsInGet();
// First, query to get IDs
const queryResponse = await this.request([