Skip to content

Commit e7bbc7d

Browse files
authored
Fix participant listeners (#6767)
Fixes a bug where all the messagesParticipants and the calendarEventParticipants were linked to a contact after its restoration.
1 parent e2eaffc commit e7bbc7d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/twenty-server/src/modules/calendar/calendar-event-participant-manager/listeners/calendar-event-participant-person.listener.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class CalendarEventParticipantPersonListener {
3232
>,
3333
) {
3434
for (const eventPayload of payload.events) {
35-
if (eventPayload.properties.after.email === null) {
35+
if (!eventPayload.properties.after.email) {
3636
continue;
3737
}
3838

packages/twenty-server/src/modules/calendar/calendar-event-participant-manager/listeners/calendar-event-participant-workspace-member.listener.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class CalendarEventParticipantWorkspaceMemberListener {
3232
>,
3333
) {
3434
for (const eventPayload of payload.events) {
35-
if (eventPayload.properties.after.userEmail === null) {
35+
if (!eventPayload.properties.after.userEmail) {
3636
continue;
3737
}
3838

packages/twenty-server/src/modules/messaging/message-participant-manager/listeners/message-participant-person.listener.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class MessageParticipantPersonListener {
3232
>,
3333
) {
3434
for (const eventPayload of payload.events) {
35-
if (eventPayload.properties.after.email === null) {
35+
if (!eventPayload.properties.after.email) {
3636
continue;
3737
}
3838

packages/twenty-server/src/modules/messaging/message-participant-manager/listeners/message-participant-workspace-member.listener.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class MessageParticipantWorkspaceMemberListener {
5252
}
5353

5454
for (const eventPayload of payload.events) {
55-
if (eventPayload.properties.after.userEmail === null) {
55+
if (!eventPayload.properties.after.userEmail) {
5656
continue;
5757
}
5858

0 commit comments

Comments
 (0)