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
This commit is contained in:
6
packages/twenty-server/src/utils/is-group-email.ts
Normal file
6
packages/twenty-server/src/utils/is-group-email.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export const isGroupEmail = (email: string): boolean => {
|
||||
const isGroupPattern =
|
||||
/noreply|no-reply|do_not_reply|no\.reply|^(info@|contact@|hello@|support@|feedback@|service@|help@|invites@|invite@|welcome@|alerts@|team@|notifications@|notification@|news@)/;
|
||||
|
||||
return isGroupPattern.test(email);
|
||||
};
|
||||
Reference in New Issue
Block a user