mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 08:53:41 +08:00
5a3494b1e1
* 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
15 lines
350 B
Ruby
15 lines
350 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Imap
|
|
module Providers
|
|
class Detector
|
|
def self.init_with_detected_provider(config)
|
|
if config[:server] == 'imap.gmail.com'
|
|
return Imap::Providers::Gmail.new(config[:server], config)
|
|
end
|
|
Imap::Providers::Generic.new(config[:server], config)
|
|
end
|
|
end
|
|
end
|
|
end
|