From 691454ef3bf83b21cd95d2da439e908136f1bc00 Mon Sep 17 00:00:00 2001 From: bosiraphael <71827178+bosiraphael@users.noreply.github.com> Date: Mon, 15 Apr 2024 18:10:12 +0200 Subject: [PATCH] 4745 move common logic between messaging and calendar in packagestwenty serversrcmodulesconnected account (#4962) Closes #4745 --- .../src/engine/integrations/message-queue/jobs.module.ts | 4 ++-- .../jobs/match-participant.job.ts | 0 .../jobs/unmatch-participant.job.ts | 0 .../listeners/participant-person.listener.ts | 6 +++--- .../listeners/participant-workspace-member.listener.ts | 6 +++--- .../add-person-id-and-workspace-member-id.module.ts | 2 +- .../add-person-id-and-workspace-member-id.service.ts | 0 .../utils/get-company-name-from-domain-name.util.ts | 0 .../utils/get-domain-name-from-handle.util.ts | 0 ...ame-and-last-name-from-handle-and-display-name.util.ts | 0 .../utils/is-person-email.util.ts | 8 ++++++++ .../calendar-event-participant.module.ts | 2 +- .../calendar-event-participant.service.ts | 2 +- .../create-company/create-company.service.ts | 2 +- .../create-contact/create-contact.service.ts | 2 +- .../services/create-company-and-contact.service.ts | 2 +- .../filter-out-contacts-from-company-or-workspace.util.ts | 2 +- .../src/modules/messaging/messaging.module.ts | 4 ++-- .../message-participant/message-participant.module.ts | 2 +- .../message-participant/message-participant.service.ts | 2 +- 20 files changed, 27 insertions(+), 19 deletions(-) rename packages/twenty-server/src/modules/{connected-account => calendar-messaging-participant}/jobs/match-participant.job.ts (100%) rename packages/twenty-server/src/modules/{connected-account => calendar-messaging-participant}/jobs/unmatch-participant.job.ts (100%) rename packages/twenty-server/src/modules/{connected-account => calendar-messaging-participant}/listeners/participant-person.listener.ts (93%) rename packages/twenty-server/src/modules/{connected-account => calendar-messaging-participant}/listeners/participant-workspace-member.listener.ts (93%) rename packages/twenty-server/src/modules/{connected-account => calendar-messaging-participant}/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.module.ts (84%) rename packages/twenty-server/src/modules/{connected-account => calendar-messaging-participant}/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.service.ts (100%) rename packages/twenty-server/src/modules/{messaging => calendar-messaging-participant}/utils/get-company-name-from-domain-name.util.ts (100%) rename packages/twenty-server/src/modules/{messaging => calendar-messaging-participant}/utils/get-domain-name-from-handle.util.ts (100%) rename packages/twenty-server/src/modules/{messaging => calendar-messaging-participant}/utils/get-first-name-and-last-name-from-handle-and-display-name.util.ts (100%) create mode 100644 packages/twenty-server/src/modules/calendar-messaging-participant/utils/is-person-email.util.ts diff --git a/packages/twenty-server/src/engine/integrations/message-queue/jobs.module.ts b/packages/twenty-server/src/engine/integrations/message-queue/jobs.module.ts index c6105a1fb9f6..83985f45e536 100644 --- a/packages/twenty-server/src/engine/integrations/message-queue/jobs.module.ts +++ b/packages/twenty-server/src/engine/integrations/message-queue/jobs.module.ts @@ -27,6 +27,8 @@ import { ObjectMetadataModule } from 'src/engine/metadata-modules/object-metadat import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module'; import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module'; import { CleanInactiveWorkspaceJob } from 'src/engine/workspace-manager/workspace-cleaner/crons/clean-inactive-workspace.job'; +import { MatchParticipantJob } from 'src/modules/calendar-messaging-participant/jobs/match-participant.job'; +import { UnmatchParticipantJob } from 'src/modules/calendar-messaging-participant/jobs/unmatch-participant.job'; import { GoogleCalendarSyncCronJob } from 'src/modules/calendar/crons/jobs/google-calendar-sync.cron.job'; import { CalendarCreateCompanyAndContactAfterSyncJob } from 'src/modules/calendar/jobs/calendar-create-company-and-contact-after-sync.job'; import { DeleteConnectedAccountAssociatedCalendarDataJob } from 'src/modules/calendar/jobs/delete-connected-account-associated-calendar-data.job'; @@ -36,8 +38,6 @@ import { CalendarEventParticipantModule } from 'src/modules/calendar/services/ca import { GoogleCalendarSyncModule } from 'src/modules/calendar/services/google-calendar-sync.module'; import { AutoCompaniesAndContactsCreationModule } from 'src/modules/connected-account/auto-companies-and-contacts-creation/auto-companies-and-contacts-creation.module'; import { CreateCompanyAndContactJob } from 'src/modules/connected-account/auto-companies-and-contacts-creation/jobs/create-company-and-contact.job'; -import { MatchParticipantJob } from 'src/modules/connected-account/jobs/match-participant.job'; -import { UnmatchParticipantJob } from 'src/modules/connected-account/jobs/unmatch-participant.job'; import { GoogleAPIRefreshAccessTokenModule } from 'src/modules/connected-account/services/google-api-refresh-access-token/google-api-refresh-access-token.module'; import { ConnectedAccountObjectMetadata } from 'src/modules/connected-account/standard-objects/connected-account.object-metadata'; import { EventObjectMetadata } from 'src/modules/event/standard-objects/event.object-metadata'; diff --git a/packages/twenty-server/src/modules/connected-account/jobs/match-participant.job.ts b/packages/twenty-server/src/modules/calendar-messaging-participant/jobs/match-participant.job.ts similarity index 100% rename from packages/twenty-server/src/modules/connected-account/jobs/match-participant.job.ts rename to packages/twenty-server/src/modules/calendar-messaging-participant/jobs/match-participant.job.ts diff --git a/packages/twenty-server/src/modules/connected-account/jobs/unmatch-participant.job.ts b/packages/twenty-server/src/modules/calendar-messaging-participant/jobs/unmatch-participant.job.ts similarity index 100% rename from packages/twenty-server/src/modules/connected-account/jobs/unmatch-participant.job.ts rename to packages/twenty-server/src/modules/calendar-messaging-participant/jobs/unmatch-participant.job.ts diff --git a/packages/twenty-server/src/modules/connected-account/listeners/participant-person.listener.ts b/packages/twenty-server/src/modules/calendar-messaging-participant/listeners/participant-person.listener.ts similarity index 93% rename from packages/twenty-server/src/modules/connected-account/listeners/participant-person.listener.ts rename to packages/twenty-server/src/modules/calendar-messaging-participant/listeners/participant-person.listener.ts index 2bd0e61096e5..925d48997d90 100644 --- a/packages/twenty-server/src/modules/connected-account/listeners/participant-person.listener.ts +++ b/packages/twenty-server/src/modules/calendar-messaging-participant/listeners/participant-person.listener.ts @@ -7,13 +7,13 @@ import { objectRecordChangedProperties as objectRecordUpdateEventChangedProperti import { MessageQueue } from 'src/engine/integrations/message-queue/message-queue.constants'; import { MessageQueueService } from 'src/engine/integrations/message-queue/services/message-queue.service'; import { - MatchParticipantJob, MatchParticipantJobData, -} from 'src/modules/connected-account/jobs/match-participant.job'; + MatchParticipantJob, +} from 'src/modules/calendar-messaging-participant/jobs/match-participant.job'; import { UnmatchParticipantJobData, UnmatchParticipantJob, -} from 'src/modules/connected-account/jobs/unmatch-participant.job'; +} from 'src/modules/calendar-messaging-participant/jobs/unmatch-participant.job'; import { PersonObjectMetadata } from 'src/modules/person/standard-objects/person.object-metadata'; @Injectable() diff --git a/packages/twenty-server/src/modules/connected-account/listeners/participant-workspace-member.listener.ts b/packages/twenty-server/src/modules/calendar-messaging-participant/listeners/participant-workspace-member.listener.ts similarity index 93% rename from packages/twenty-server/src/modules/connected-account/listeners/participant-workspace-member.listener.ts rename to packages/twenty-server/src/modules/calendar-messaging-participant/listeners/participant-workspace-member.listener.ts index d0610402c787..fadb10b921e4 100644 --- a/packages/twenty-server/src/modules/connected-account/listeners/participant-workspace-member.listener.ts +++ b/packages/twenty-server/src/modules/calendar-messaging-participant/listeners/participant-workspace-member.listener.ts @@ -7,13 +7,13 @@ import { objectRecordChangedProperties as objectRecordUpdateEventChangedProperti import { MessageQueue } from 'src/engine/integrations/message-queue/message-queue.constants'; import { MessageQueueService } from 'src/engine/integrations/message-queue/services/message-queue.service'; import { - MatchParticipantJob, MatchParticipantJobData, -} from 'src/modules/connected-account/jobs/match-participant.job'; + MatchParticipantJob, +} from 'src/modules/calendar-messaging-participant/jobs/match-participant.job'; import { UnmatchParticipantJobData, UnmatchParticipantJob, -} from 'src/modules/connected-account/jobs/unmatch-participant.job'; +} from 'src/modules/calendar-messaging-participant/jobs/unmatch-participant.job'; import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/standard-objects/workspace-member.object-metadata'; @Injectable() diff --git a/packages/twenty-server/src/modules/connected-account/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.module.ts b/packages/twenty-server/src/modules/calendar-messaging-participant/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.module.ts similarity index 84% rename from packages/twenty-server/src/modules/connected-account/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.module.ts rename to packages/twenty-server/src/modules/calendar-messaging-participant/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.module.ts index 288f0c797bce..1502297e4a2c 100644 --- a/packages/twenty-server/src/modules/connected-account/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.module.ts +++ b/packages/twenty-server/src/modules/calendar-messaging-participant/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.module.ts @@ -2,7 +2,7 @@ import { Module } from '@nestjs/common'; import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module'; import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module'; -import { AddPersonIdAndWorkspaceMemberIdService } from 'src/modules/connected-account/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.service'; +import { AddPersonIdAndWorkspaceMemberIdService } from 'src/modules/calendar-messaging-participant/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.service'; import { PersonObjectMetadata } from 'src/modules/person/standard-objects/person.object-metadata'; @Module({ diff --git a/packages/twenty-server/src/modules/connected-account/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.service.ts b/packages/twenty-server/src/modules/calendar-messaging-participant/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.service.ts similarity index 100% rename from packages/twenty-server/src/modules/connected-account/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.service.ts rename to packages/twenty-server/src/modules/calendar-messaging-participant/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.service.ts diff --git a/packages/twenty-server/src/modules/messaging/utils/get-company-name-from-domain-name.util.ts b/packages/twenty-server/src/modules/calendar-messaging-participant/utils/get-company-name-from-domain-name.util.ts similarity index 100% rename from packages/twenty-server/src/modules/messaging/utils/get-company-name-from-domain-name.util.ts rename to packages/twenty-server/src/modules/calendar-messaging-participant/utils/get-company-name-from-domain-name.util.ts diff --git a/packages/twenty-server/src/modules/messaging/utils/get-domain-name-from-handle.util.ts b/packages/twenty-server/src/modules/calendar-messaging-participant/utils/get-domain-name-from-handle.util.ts similarity index 100% rename from packages/twenty-server/src/modules/messaging/utils/get-domain-name-from-handle.util.ts rename to packages/twenty-server/src/modules/calendar-messaging-participant/utils/get-domain-name-from-handle.util.ts diff --git a/packages/twenty-server/src/modules/messaging/utils/get-first-name-and-last-name-from-handle-and-display-name.util.ts b/packages/twenty-server/src/modules/calendar-messaging-participant/utils/get-first-name-and-last-name-from-handle-and-display-name.util.ts similarity index 100% rename from packages/twenty-server/src/modules/messaging/utils/get-first-name-and-last-name-from-handle-and-display-name.util.ts rename to packages/twenty-server/src/modules/calendar-messaging-participant/utils/get-first-name-and-last-name-from-handle-and-display-name.util.ts diff --git a/packages/twenty-server/src/modules/calendar-messaging-participant/utils/is-person-email.util.ts b/packages/twenty-server/src/modules/calendar-messaging-participant/utils/is-person-email.util.ts new file mode 100644 index 000000000000..387a94e5040d --- /dev/null +++ b/packages/twenty-server/src/modules/calendar-messaging-participant/utils/is-person-email.util.ts @@ -0,0 +1,8 @@ +export const isPersonEmail = (email: string | undefined): boolean => { + if (!email) return false; + + const nonPersonalPattern = + /noreply|no-reply|do_not_reply|no\.reply|^(accounts@|info@|admin@|contact@|hello@|support@|sales@|feedback@|service@|help@|mailer-daemon|notifications?|digest|auto|apps|assign|comments|customer-success|enterprise|esign|express|forum|gc@|learn|mailer|marketing|messages|news|notification|payments|receipts|recrutement|security|service|support|team)/; + + return !nonPersonalPattern.test(email); +}; diff --git a/packages/twenty-server/src/modules/calendar/services/calendar-event-participant/calendar-event-participant.module.ts b/packages/twenty-server/src/modules/calendar/services/calendar-event-participant/calendar-event-participant.module.ts index 785826ff10db..933335fd9b6b 100644 --- a/packages/twenty-server/src/modules/calendar/services/calendar-event-participant/calendar-event-participant.module.ts +++ b/packages/twenty-server/src/modules/calendar/services/calendar-event-participant/calendar-event-participant.module.ts @@ -2,8 +2,8 @@ import { Module } from '@nestjs/common'; import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module'; import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module'; +import { AddPersonIdAndWorkspaceMemberIdModule } from 'src/modules/calendar-messaging-participant/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.module'; import { CalendarEventParticipantService } from 'src/modules/calendar/services/calendar-event-participant/calendar-event-participant.service'; -import { AddPersonIdAndWorkspaceMemberIdModule } from 'src/modules/connected-account/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.module'; import { PersonObjectMetadata } from 'src/modules/person/standard-objects/person.object-metadata'; @Module({ diff --git a/packages/twenty-server/src/modules/calendar/services/calendar-event-participant/calendar-event-participant.service.ts b/packages/twenty-server/src/modules/calendar/services/calendar-event-participant/calendar-event-participant.service.ts index b6d2f8440983..6a8c57bb4f9a 100644 --- a/packages/twenty-server/src/modules/calendar/services/calendar-event-participant/calendar-event-participant.service.ts +++ b/packages/twenty-server/src/modules/calendar/services/calendar-event-participant/calendar-event-participant.service.ts @@ -8,9 +8,9 @@ import { PersonObjectMetadata } from 'src/modules/person/standard-objects/person import { WorkspaceDataSourceService } from 'src/engine/workspace-datasource/workspace-datasource.service'; import { getFlattenedValuesAndValuesStringForBatchRawQuery } from 'src/modules/calendar/utils/getFlattenedValuesAndValuesStringForBatchRawQuery.util'; import { CalendarEventParticipant } from 'src/modules/calendar/types/calendar-event'; -import { AddPersonIdAndWorkspaceMemberIdService } from 'src/modules/connected-account/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.service'; import { CalendarEventParticipantRepository } from 'src/modules/calendar/repositories/calendar-event-participant.repository'; import { CalendarEventParticipantObjectMetadata } from 'src/modules/calendar/standard-objects/calendar-event-participant.object-metadata'; +import { AddPersonIdAndWorkspaceMemberIdService } from 'src/modules/calendar-messaging-participant/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.service'; @Injectable() export class CalendarEventParticipantService { diff --git a/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/create-company/create-company.service.ts b/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/create-company/create-company.service.ts index 57397208702d..c7f1e9a89cba 100644 --- a/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/create-company/create-company.service.ts +++ b/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/create-company/create-company.service.ts @@ -5,7 +5,7 @@ import { v4 } from 'uuid'; import axios, { AxiosInstance } from 'axios'; import { CompanyRepository } from 'src/modules/company/repositories/company.repository'; -import { getCompanyNameFromDomainName } from 'src/modules/messaging/utils/get-company-name-from-domain-name.util'; +import { getCompanyNameFromDomainName } from 'src/modules/calendar-messaging-participant/utils/get-company-name-from-domain-name.util'; import { InjectObjectMetadataRepository } from 'src/engine/object-metadata-repository/object-metadata-repository.decorator'; import { CompanyObjectMetadata } from 'src/modules/company/standard-objects/company.object-metadata'; @Injectable() diff --git a/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/create-contact/create-contact.service.ts b/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/create-contact/create-contact.service.ts index be3db3574917..720dee298441 100644 --- a/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/create-contact/create-contact.service.ts +++ b/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/create-contact/create-contact.service.ts @@ -4,7 +4,7 @@ import { EntityManager } from 'typeorm'; import { v4 } from 'uuid'; import { PersonRepository } from 'src/modules/person/repositories/person.repository'; -import { getFirstNameAndLastNameFromHandleAndDisplayName } from 'src/modules/messaging/utils/get-first-name-and-last-name-from-handle-and-display-name.util'; +import { getFirstNameAndLastNameFromHandleAndDisplayName } from 'src/modules/calendar-messaging-participant/utils/get-first-name-and-last-name-from-handle-and-display-name.util'; import { InjectObjectMetadataRepository } from 'src/engine/object-metadata-repository/object-metadata-repository.decorator'; import { PersonObjectMetadata } from 'src/modules/person/standard-objects/person.object-metadata'; diff --git a/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/services/create-company-and-contact.service.ts b/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/services/create-company-and-contact.service.ts index c205753b08fc..15ea7d6adab8 100644 --- a/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/services/create-company-and-contact.service.ts +++ b/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/services/create-company-and-contact.service.ts @@ -4,7 +4,7 @@ import { InjectRepository } from '@nestjs/typeorm'; import { EntityManager, Repository } from 'typeorm'; import compact from 'lodash/compact'; -import { getDomainNameFromHandle } from 'src/modules/messaging/utils/get-domain-name-from-handle.util'; +import { getDomainNameFromHandle } from 'src/modules/calendar-messaging-participant/utils/get-domain-name-from-handle.util'; import { CreateCompanyService } from 'src/modules/connected-account/auto-companies-and-contacts-creation/create-company/create-company.service'; import { CreateContactService } from 'src/modules/connected-account/auto-companies-and-contacts-creation/create-contact/create-contact.service'; import { PersonRepository } from 'src/modules/person/repositories/person.repository'; diff --git a/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/utils/filter-out-contacts-from-company-or-workspace.util.ts b/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/utils/filter-out-contacts-from-company-or-workspace.util.ts index 37e52e333da5..ecc61c0663e9 100644 --- a/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/utils/filter-out-contacts-from-company-or-workspace.util.ts +++ b/packages/twenty-server/src/modules/connected-account/auto-companies-and-contacts-creation/utils/filter-out-contacts-from-company-or-workspace.util.ts @@ -1,4 +1,4 @@ -import { getDomainNameFromHandle } from 'src/modules/messaging/utils/get-domain-name-from-handle.util'; +import { getDomainNameFromHandle } from 'src/modules/calendar-messaging-participant/utils/get-domain-name-from-handle.util'; import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/standard-objects/workspace-member.object-metadata'; import { ObjectRecord } from 'src/engine/workspace-manager/workspace-sync-metadata/types/object-record'; import { Contacts } from 'src/modules/connected-account/auto-companies-and-contacts-creation/types/contact.type'; diff --git a/packages/twenty-server/src/modules/messaging/messaging.module.ts b/packages/twenty-server/src/modules/messaging/messaging.module.ts index 82954a3dac6b..1b8ba8ed8192 100644 --- a/packages/twenty-server/src/modules/messaging/messaging.module.ts +++ b/packages/twenty-server/src/modules/messaging/messaging.module.ts @@ -1,11 +1,11 @@ import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; -import { ParticipantPersonListener } from 'src/modules/connected-account/listeners/participant-person.listener'; -import { ParticipantWorkspaceMemberListener } from 'src/modules/connected-account/listeners/participant-workspace-member.listener'; import { MessagingMessageChannelListener } from 'src/modules/messaging/listeners/messaging-message-channel.listener'; import { MessagingConnectedAccountListener } from 'src/modules/messaging/listeners/messaging-connected-account.listener'; import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity'; +import { ParticipantPersonListener } from 'src/modules/calendar-messaging-participant/listeners/participant-person.listener'; +import { ParticipantWorkspaceMemberListener } from 'src/modules/calendar-messaging-participant/listeners/participant-workspace-member.listener'; @Module({ imports: [TypeOrmModule.forFeature([FeatureFlagEntity], 'core')], diff --git a/packages/twenty-server/src/modules/messaging/services/message-participant/message-participant.module.ts b/packages/twenty-server/src/modules/messaging/services/message-participant/message-participant.module.ts index 202a782f1276..3735240a8673 100644 --- a/packages/twenty-server/src/modules/messaging/services/message-participant/message-participant.module.ts +++ b/packages/twenty-server/src/modules/messaging/services/message-participant/message-participant.module.ts @@ -2,7 +2,7 @@ import { Module } from '@nestjs/common'; import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module'; import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module'; -import { AddPersonIdAndWorkspaceMemberIdModule } from 'src/modules/connected-account/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.module'; +import { AddPersonIdAndWorkspaceMemberIdModule } from 'src/modules/calendar-messaging-participant/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.module'; import { MessageParticipantService } from 'src/modules/messaging/services/message-participant/message-participant.service'; import { MessageParticipantObjectMetadata } from 'src/modules/messaging/standard-objects/message-participant.object-metadata'; import { PersonObjectMetadata } from 'src/modules/person/standard-objects/person.object-metadata'; diff --git a/packages/twenty-server/src/modules/messaging/services/message-participant/message-participant.service.ts b/packages/twenty-server/src/modules/messaging/services/message-participant/message-participant.service.ts index c6fc1e2ce13e..5d65b1c34a2d 100644 --- a/packages/twenty-server/src/modules/messaging/services/message-participant/message-participant.service.ts +++ b/packages/twenty-server/src/modules/messaging/services/message-participant/message-participant.service.ts @@ -8,9 +8,9 @@ import { PersonRepository } from 'src/modules/person/repositories/person.reposit import { PersonObjectMetadata } from 'src/modules/person/standard-objects/person.object-metadata'; import { WorkspaceDataSourceService } from 'src/engine/workspace-datasource/workspace-datasource.service'; import { getFlattenedValuesAndValuesStringForBatchRawQuery } from 'src/modules/calendar/utils/getFlattenedValuesAndValuesStringForBatchRawQuery.util'; -import { AddPersonIdAndWorkspaceMemberIdService } from 'src/modules/connected-account/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.service'; import { MessageParticipantRepository } from 'src/modules/messaging/repositories/message-participant.repository'; import { MessageParticipantObjectMetadata } from 'src/modules/messaging/standard-objects/message-participant.object-metadata'; +import { AddPersonIdAndWorkspaceMemberIdService } from 'src/modules/calendar-messaging-participant/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.service'; @Injectable() export class MessageParticipantService {