mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: IMAP archive fix and group list mailbox code unification (#10355)
* Fixed an issue I introduced in the last PR where I am just archiving everything regardless of whether it is actually archived in Discourse man_facepalming * Refactor group list_mailboxes IMAP code to use providers, add specs, and add provider code to get the correct prodivder
This commit is contained in:
@@ -25,7 +25,7 @@ class Demon::EmailSync < ::Demon::Base
|
||||
RailsMultisite::ConnectionManagement.with_connection(db) do
|
||||
puts "[EmailSync] Thread started for group #{group.name} (id = #{group.id}) in db #{db}"
|
||||
begin
|
||||
obj = Imap::Sync.for_group(group)
|
||||
obj = Imap::Sync.new(group)
|
||||
rescue Net::IMAP::NoResponseError => e
|
||||
group.update(imap_last_error: e.message)
|
||||
Thread.exit
|
||||
|
||||
Reference in New Issue
Block a user