fix: disable iMIP scheduling on calendar import #411

This commit is contained in:
Linus Rath
2026-06-24 19:29:56 +02:00
parent ae5d397512
commit 7882b254a0
+7 -1
View File
@@ -4738,8 +4738,14 @@ export class JMAPClient implements IJMAPClient {
debug.log('calendar', 'CalendarEvent/batchCreate', { count: events.length, accountId });
// Never emit iMIP scheduling messages when importing. Imported events often
// carry an organizer/participants where the current user is the organizer;
// without this, Stalwart tries to send invitation emails to every attendee
// synchronously during CalendarEvent/set, which is both wrong (importing a
// calendar should not spam invites) and can block the request indefinitely,
// leaving the import spinner spinning forever (#411).
const response = await this.request([
["CalendarEvent/set", { accountId, create: createMap }, "0"]
["CalendarEvent/set", { accountId, sendSchedulingMessages: false, create: createMap }, "0"]
], this.calendarUsing());
const createdIds: string[] = [];