4398 decouple contacts and companies creation from messages import (#4590)
* emit event * create queue and listener * filter participants with role 'from' * create job * Add job to job module * Refactoring * Refactor contact creation in CreateCompanyAndContactService * update job * wip * add getByHandlesWithoutPersonIdAndWorkspaceMemberId to calendar event attendee repository * refactoring * refactoring * Revert "refactoring" This reverts commit e5434f0b871e45447227aa8d55ba5af381c3ff1c. * fix nest imports * add await * fix contact creation condition * emit contact creation event after calendar-full-sync * add await * add missing transactionManager * calendar event attendees personId update is working * messageParticipant and calendarEventAttendee update is working as intended * rename module * fix lodash import * add test * update package.json
This commit is contained in:
@ -17,7 +17,7 @@ import { MessageChannelMessageAssociationRepository } from 'src/modules/messagin
|
||||
import { createQueriesFromMessageIds } from 'src/modules/messaging/utils/create-queries-from-message-ids.util';
|
||||
import { gmailSearchFilterExcludeEmails } from 'src/modules/messaging/utils/gmail-search-filter.util';
|
||||
import { BlocklistRepository } from 'src/modules/connected-account/repositories/blocklist.repository';
|
||||
import { SaveMessagesAndCreateContactsService } from 'src/modules/messaging/services/save-message-and-create-contact/save-messages-and-create-contacts.service';
|
||||
import { SaveMessageAndEmitContactCreationEventService } from 'src/modules/messaging/services/save-message-and-emit-contact-creation-event/save-message-and-emit-contact-creation-event.service';
|
||||
import {
|
||||
FeatureFlagEntity,
|
||||
FeatureFlagKeys,
|
||||
@ -47,7 +47,7 @@ export class GmailFullSyncService {
|
||||
private readonly messageChannelMessageAssociationRepository: MessageChannelMessageAssociationRepository,
|
||||
@InjectObjectMetadataRepository(BlocklistObjectMetadata)
|
||||
private readonly blocklistRepository: BlocklistRepository,
|
||||
private readonly saveMessagesAndCreateContactsService: SaveMessagesAndCreateContactsService,
|
||||
private readonly saveMessagesAndCreateContactsService: SaveMessageAndEmitContactCreationEventService,
|
||||
@InjectRepository(FeatureFlagEntity, 'core')
|
||||
private readonly featureFlagRepository: Repository<FeatureFlagEntity>,
|
||||
) {}
|
||||
|
||||
Reference in New Issue
Block a user