Closed bosiraphael closed 1 month ago
To resolve the issue of double creation of contacts when updating calendar event participants, follow these steps:
Review updateCalendarEventParticipantsAfterPeopleCreation
Method:
/packages/twenty-server/src/modules/calendar/services/calendar-event-participant/calendar-event-participant.service.ts
Check createCompaniesAndContactsAndUpdateParticipants
Method:
/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/services/create-company-and-contact.service.ts
Inspect handleUpdatedEvent
Method:
/packages/twenty-server/src/modules/calendar/listeners/calendar-channel.listener.ts
isContactAutoCreationEnabled
is true.Examine handleCalendarEventParticipantMatchedEvent
Method:
/packages/twenty-server/src/modules/calendar/listeners/calendar-event-participant.listener.ts
Add Logging:
/packages/twenty-server/src/modules/calendar/services/calendar-event-participant/calendar-event-participant.service.ts /packages/twenty-server/src/modules/calendar/repositories/calendar-event-participant.repository.ts /packages/twenty-server/src/modules/calendar/services/google-calendar-sync/google-calendar-sync.service.ts /packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/services/create-company-and-contact.service.ts /packages/twenty-server/src/modules/calendar/listeners/calendar-channel.listener.ts /packages/twenty-server/src/modules/calendar/listeners/calendar-event-participant.listener.ts
Bug Description
The calendar module refactoring introduced a bug when calendar events are updated which causes contacts to be created twice, or events to not be assigned correctly to a participant.
Expected behavior
The calendar event participants should be updated correctly.