IMAP Fixes & Improvements (#13582)

- Removed caching of IMAP client as it was problematic and didn't really
matter because of our pipeline, also added retry logic to client.
- Some code refactoring and cleanup
- Breaking changes:
   - Removed messageChannel.syncCursor
   - Uses messageFolder.syncCursor instead
- Removed Date based sync cursor in favor of message UID which is much
more reliable and precise

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
neo773
2025-08-05 13:16:28 +05:30
committed by GitHub
parent ca6322cae6
commit 9ceb097ab7
8 changed files with 246 additions and 220 deletions
@@ -175,7 +175,11 @@ export class WorkspaceInsertQueryBuilder<
const resultWithoutInsertionExtraColumns = result.raw.map(
(rawResult: Record<string, string>) =>
Object.keys(rawResult)
.filter((key) => this.expressionMap.returning.includes(key))
.filter(
(key) =>
this.expressionMap.returning.includes(key) ||
this.expressionMap.returning === '*',
)
.reduce((filtered: Record<string, string>, key) => {
filtered[key] = rawResult[key];