From dab3606b04698e63fcf0e3c88862e5b7441d54da Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Tue, 31 Mar 2026 16:15:56 +0200 Subject: [PATCH] fix: strip server-immutable fields from updates before sending to JMAP #128 --- lib/jmap/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jmap/client.ts b/lib/jmap/client.ts index 9c3b9b29..c1a0a0d5 100644 --- a/lib/jmap/client.ts +++ b/lib/jmap/client.ts @@ -3513,8 +3513,8 @@ export class JMAPClient implements IJMAPClient { ): Promise { const accountId = targetAccountId || this.getCalendarsAccountId(); - // Strip client-only shared fields before sending to JMAP - const { originalId: _oi, originalCalendarIds: _oc, accountId: _ai, accountName: _an, isShared: _is, ...cleanUpdates } = updates as CalendarEvent; + // Strip client-only and server-immutable fields before sending to JMAP + const { id: _id, uid: _uid, '@type': _typ, created: _cr, updated: _up, sequence: _sq, isOrigin: _io, isDraft: _idr, originalId: _oi, originalCalendarIds: _oc, accountId: _ai, accountName: _an, isShared: _is, ...cleanUpdates } = updates as CalendarEvent; cleanRecurrenceRules(cleanUpdates as unknown as Record); const setArgs: Record = {