Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: IMAP sync email update uniqueness across groups and minor improvements #10332

Merged
merged 12 commits into from Aug 3, 2020

Conversation

martin-brennan
Copy link
Contributor

@martin-brennan martin-brennan commented Jul 29, 2020

Adds a imap_group_id column to IncomingEmail to deal with an issue where we were trying to update emails in the mailbox, calling IncomingEmail.where(imap_sync: true). However UID and UIDVALIDITY could be the same across accounts. So if group A used IMAP details for Gmail account A, and group B used IMAP details for Gmail account B, and both tried to sync changes to an email with UID of 3 (e.g. changing Labels), one account could affect the other. This even applied to Archiving!

Also in this PR:

  • Fix error occurring if we do a uid_fetch and no emails are returned
  • Allow for creating labels within the target mailbox (previously we would not do this, only use existing labels)
  • Improve consistency for log messages
  • Add specs for generic IMAP provider (Gmail specs still to come)
  • Add custom archiving support for Gmail
  • Only use Message-ID for uniqueness of IncomingEmail if it was generated by us
  • Various refactors and improvements

@martin-brennan martin-brennan changed the title FIX: IMAP sync email update uniqueness across groups FIX: IMAP sync email update uniqueness across groups and minor improvements Jul 29, 2020
@martin-brennan martin-brennan merged commit 2920988 into master Aug 3, 2020
@martin-brennan martin-brennan deleted the issue/fix-imap-sync-email-update-uniqueness branch August 3, 2020 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants