3807 auto creation of contact when importing emails (#3888)

* Add CreateContactService to messaging services

* Add logic to create a contact if it doesn't exist

* Add name

* Improvements

* contact creation working

* fix bug

* Add IsPersonEmailService to check if an email is personal or not

* filter is working

* improve filter

* create companies and people

* Refactor createContactFromHandleAndDisplayName to createContactAndCompanyFromHandleAndDisplayName

* improve regex

* reorganizing services

* updates

* reorganize folders

* wip

* use transaction

* wip

* wip

* wip

* batch queries

* almost working

* working
This commit is contained in:
bosiraphael
2024-02-13 14:24:28 +01:00
committed by GitHub
parent b286232ea7
commit 1d1976ef22
17 changed files with 576 additions and 337 deletions

View File

@ -1,10 +1,18 @@
import { Module } from '@nestjs/common';
import { MessageChannelMessageAssociationModule } from 'src/workspace/messaging/message-channel-message-association/message-channel-message-assocation.module';
import { MessageParticipantModule } from 'src/workspace/messaging/message-participant/message-participant.module';
import { MessageThreadModule } from 'src/workspace/messaging/message-thread/message-thread.module';
import { MessageService } from 'src/workspace/messaging/message/message.service';
import { WorkspaceDataSourceModule } from 'src/workspace/workspace-datasource/workspace-datasource.module';
@Module({
imports: [WorkspaceDataSourceModule],
imports: [
WorkspaceDataSourceModule,
MessageThreadModule,
MessageParticipantModule,
MessageChannelMessageAssociationModule,
],
providers: [MessageService],
exports: [MessageService],
})