@@ -362,9 +362,15 @@ export class GoogleCalendar
362362 let resolvedCalendarId = calendarId ;
363363 if ( authToken ) {
364364 try {
365- resolvedCalendarId = await this . resolveCalendarId ( authToken , calendarId ) ;
365+ resolvedCalendarId = await this . resolveCalendarId (
366+ authToken ,
367+ calendarId
368+ ) ;
366369 } catch ( error ) {
367- console . warn ( "Failed to resolve calendar ID, using provided value" , error ) ;
370+ console . warn (
371+ "Failed to resolve calendar ID, using provided value" ,
372+ error
373+ ) ;
368374 }
369375 }
370376
@@ -473,7 +479,6 @@ export class GoogleCalendar
473479 */
474480 private async renewCalendarWatch ( calendarId : string ) : Promise < void > {
475481 try {
476-
477482 // Get auth token
478483 const authToken = await this . get < string > ( `auth_token_${ calendarId } ` ) ;
479484 if ( ! authToken ) {
@@ -502,7 +507,6 @@ export class GoogleCalendar
502507
503508 // Create new watch (reuses existing webhook URL and callback)
504509 await this . setupCalendarWatch ( authToken , calendarId , authToken ) ;
505-
506510 } catch ( error ) {
507511 console . error ( `Failed to renew watch for calendar ${ calendarId } :` , error ) ;
508512 // Don't throw - let reactive checking handle it as fallback
@@ -583,9 +587,11 @@ export class GoogleCalendar
583587 const syncLock = await this . get < boolean > ( `sync_lock_${ calendarId } ` ) ;
584588 if ( ! syncLock ) {
585589 // Both state and lock are cleared - sync completed normally, this is a stale callback
586- } else {
590+ } else {
587591 // State missing but lock still set - sync may have been superseded
588- console . warn ( `No sync state found for calendar ${ calendarId } , sync may have been superseded` ) ;
592+ console . warn (
593+ `No sync state found for calendar ${ calendarId } , sync may have been superseded`
594+ ) ;
589595 await this . clear ( `sync_lock_${ calendarId } ` ) ;
590596 }
591597 return ;
@@ -678,7 +684,12 @@ export class GoogleCalendar
678684
679685 // Check if this is a recurring event instance (exception)
680686 if ( event . recurringEventId && event . originalStartTime ) {
681- await this . processEventInstance ( event , calendarId , initialSync , callbackToken ) ;
687+ await this . processEventInstance (
688+ event ,
689+ calendarId ,
690+ initialSync ,
691+ callbackToken
692+ ) ;
682693 } else {
683694 // Regular or master recurring event
684695 const activityData = transformGoogleEvent ( event , calendarId ) ;
@@ -700,14 +711,13 @@ export class GoogleCalendar
700711 // Convert to Note type with blocked tag and cancellation note
701712 const activity : NewActivityWithNotes = {
702713 source : canonicalUrl ,
714+ created : event . created ? new Date ( event . created ) : undefined ,
703715 type : ActivityType . Note ,
704- title : activityData . title || "" ,
716+ title : activityData . title ,
717+ preview : "Cancelled" ,
705718 start : activityData . start || null ,
706719 end : activityData . end || null ,
707720 meta : activityData . meta ?? null ,
708- tags : {
709- [ Tag . Blocked ] : [ ] , // Toggle tag, empty actor array
710- } ,
711721 notes : [ cancelNote ] ,
712722 ...( initialSync ? { unread : false } : { } ) , // false for initial sync, omit for incremental updates
713723 ...( initialSync ? { archived : false } : { } ) , // unarchive on initial sync only
@@ -1087,7 +1097,10 @@ export class GoogleCalendar
10871097 // Trigger contacts sync with the same authorization
10881098 // This happens automatically when calendar auth succeeds
10891099 try {
1090- const token = await this . tools . integrations . get ( authResult . provider , authResult . actor . id ) ;
1100+ const token = await this . tools . integrations . get (
1101+ authResult . provider ,
1102+ authResult . actor . id
1103+ ) ;
10911104 if ( token ) {
10921105 await this . tools . googleContacts . syncWithAuth (
10931106 authResult ,
0 commit comments