From 9ba211055a5c037cb4aa19178c467dcc59688203 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Mon, 8 Jul 2024 14:33:48 +0200 Subject: [PATCH] Add message import granulary on non-pro emails, group emails and received contact creation (#6156) 1) Remove featureFlag 2) Base contactCreation on messageChannel.autoContactCreationPolicy 4) add excludeProfessionalEmails + excludeGroupEmails logic --- .../OnboardingSyncEmailsSettingsCard.tsx | 1 + ...AccountsCalendarVisibilitySettingsCard.tsx | 1 + ...ettingsAccountsMessageAutoCreationCard.tsx | 1 + .../SettingsAccountsMessageVisibilityCard.tsx | 1 + .../SettingsAccountsRadioSettingsCard.tsx | 3 + .../SettingsAccountsRowDropdownMenu.tsx | 8 +-- .../src/modules/ui/input/components/Radio.tsx | 13 ++-- .../modules/ui/layout/tab/components/Tab.tsx | 2 +- .../typeorm-seeds/core/feature-flags.ts | 5 -- .../feature-flag/feature-flag.entity.ts | 13 ++-- .../commands/add-standard-id.command.ts | 10 ++- .../create-company-and-contact.service.ts | 41 +++++------- ...es-and-enqueue-contact-creation.service.ts | 65 +++++++++++-------- ...messaging-gmail-messages-import.service.ts | 34 +++++----- .../utils/filter-emails.util.ts | 21 +----- ...eate-company-and-contact-after-sync.job.ts | 57 +++++++--------- .../twenty-server/src/utils/is-group-email.ts | 6 ++ 17 files changed, 135 insertions(+), 147 deletions(-) create mode 100644 packages/twenty-server/src/utils/is-group-email.ts diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingSyncEmailsSettingsCard.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingSyncEmailsSettingsCard.tsx index 61605ec003..2a01962fdf 100644 --- a/packages/twenty-front/src/modules/onboarding/components/OnboardingSyncEmailsSettingsCard.tsx +++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingSyncEmailsSettingsCard.tsx @@ -12,6 +12,7 @@ export const OnboardingSyncEmailsSettingsCard = ({ value = MessageChannelVisibility.ShareEverything, }: OnboardingSyncEmailsSettingsCardProps) => ( ( ( ( = onChange: (nextValue: Option['value']) => void; options: Option[]; value: Option['value']; + name: string; }; const StyledCardContent = styled(CardContent)` @@ -49,6 +50,7 @@ export const SettingsAccountsRadioSettingsCard = < onChange, options, value, + name, }: SettingsAccountsRadioSettingsCardProps