@@ -894,7 +894,7 @@ export class GoogleCalendar
894894 // Transform the instance data
895895 const instanceData = transformGoogleEvent ( event , calendarId ) ;
896896
897- // Handle cancelled recurring instances by archiving the occurrence
897+ // Handle cancelled recurring instances by adding to recurrence exdates
898898 if ( event . status === "cancelled" ) {
899899 // Extract start/end from the event (they're present even for cancelled events)
900900 const start = event . start ?. dateTime
@@ -909,20 +909,12 @@ export class GoogleCalendar
909909 ? event . end . date
910910 : null ;
911911
912- const occurrence : Omit < NewActivityOccurrence , "activity" > = {
913- occurrence : new Date ( originalStartTime ) ,
914- start : start instanceof Date ? start : new Date ( originalStartTime ) ,
915- archived : true ,
916- } ;
917-
918- // Include start/end at activity level to allow master activity creation
919- // during initial sync (upsert_activity needs these to infer scheduling)
920912 const occurrenceUpdate = {
921913 type : ActivityType . Event ,
922914 source : masterCanonicalUrl ,
923915 start : start ,
924916 end : end ,
925- occurrences : [ occurrence ] ,
917+ addRecurrenceExdates : [ new Date ( originalStartTime ) ] ,
926918 } ;
927919
928920 await this . tools . callbacks . run ( callbackToken , occurrenceUpdate ) ;
0 commit comments