From d63937ec6fd9db3f8cc3463974d510d3441ed19a Mon Sep 17 00:00:00 2001 From: bosiraphael <71827178+bosiraphael@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:45:31 +0200 Subject: [PATCH] 4988 dont import emails with ics attachments (#4990) - Closes #4988 - Fix parenthesis error in filter --- .../src/modules/messaging/utils/gmail-search-filter.util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/twenty-server/src/modules/messaging/utils/gmail-search-filter.util.ts b/packages/twenty-server/src/modules/messaging/utils/gmail-search-filter.util.ts index 38b12ca3357e..70f888485fb3 100644 --- a/packages/twenty-server/src/modules/messaging/utils/gmail-search-filter.util.ts +++ b/packages/twenty-server/src/modules/messaging/utils/gmail-search-filter.util.ts @@ -3,12 +3,12 @@ export const gmailSearchFilterNonPersonalEmails = export const gmailSearchFilterExcludeEmails = (emails: string[]): string => { if (emails.length === 0) { - return `from:-(${gmailSearchFilterNonPersonalEmails} -category:promotions -category:social -category:forums`; + return `from:-(${gmailSearchFilterNonPersonalEmails}) -category:promotions -category:social -category:forums -filename:.ics`; } return `(in:inbox from:-(${gmailSearchFilterNonPersonalEmails}|${emails.join( '|', )})|(in:sent to:-(${gmailSearchFilterNonPersonalEmails}|${emails.join( '|', - )})) -category:promotions -category:social -category:forums`; + )})) -category:promotions -category:social -category:forums -filename:.ics`; };