mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 08:23:37 +08:00
20 lines
442 B
Ruby
20 lines
442 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class ProblemCheck::MissingMailgunApiKey < ProblemCheck
|
||
|
self.priority = "low"
|
||
|
|
||
|
def call
|
||
|
return no_problem if !SiteSetting.reply_by_email_enabled
|
||
|
return no_problem if !ActionMailer::Base.smtp_settings.dig(:address, "smtp.mailgun.org")
|
||
|
return no_problem if SiteSetting.mailgun_api_key.present?
|
||
|
|
||
|
problem
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def translation_key
|
||
|
"dashboard.missing_mailgun_api_key"
|
||
|
end
|
||
|
end
|