Skip to content

Commit

Permalink
4988 dont import emails with ics attachments (#4990)
Browse files Browse the repository at this point in the history
- Closes #4988 
- Fix parenthesis error in filter
  • Loading branch information
bosiraphael authored Apr 16, 2024
1 parent 4bf2378 commit d63937e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
};

0 comments on commit d63937e

Please sign in to comment.