FEATURE: IMAP delete email sync for group inboxes (#10392)

Adds functionality to reflect topic delete in Discourse to IMAP inbox (Gmail only for now) and reflecting Gmail deletes in Discourse.

Adding lots of tests, various refactors and code improvements.

When Discourse topic is destroyed in PostDestroyer mark the topic incoming email as imap_sync: true, and do the opposite when post is recovered.
This commit is contained in:
Martin Brennan
2020-08-12 10:16:26 +10:00
committed by GitHub
parent 6391db5921
commit 95b71b35d6
11 changed files with 508 additions and 20 deletions

View File

@ -988,7 +988,9 @@ module Email
if Array === references
references
elsif references.present?
references.split(/[\s,]/).map { |r| r.tr("<>", "") }
references.split(/[\s,]/).map do |r|
Email.message_id_clean(r)
end
end
end