mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FEATURE: allow version emails to be disabled globally
This commit is contained in:
parent
ae9fcf17ef
commit
f493eb5d12
2 changed files with 12 additions and 2 deletions
|
@ -18,9 +18,14 @@ module Jobs
|
|||
DiscourseUpdates.updated_at = Time.zone.now
|
||||
DiscourseUpdates.missing_versions = json['versions']
|
||||
|
||||
if SiteSetting.new_version_emails and json['missingVersionsCount'] > 0 and prev_missing_versions_count < json['missingVersionsCount'].to_i
|
||||
if GlobalSetting.new_version_emails and
|
||||
SiteSetting.new_version_emails and
|
||||
json['missingVersionsCount'] > 0 and
|
||||
prev_missing_versions_count < json['missingVersionsCount'].to_i
|
||||
|
||||
message = VersionMailer.send_notice
|
||||
Email::Sender.new(message, :new_version).send
|
||||
|
||||
end
|
||||
rescue => e
|
||||
raise e unless Rails.env.development? # Fail version check silently in development mode
|
||||
|
|
|
@ -100,3 +100,8 @@ sidekiq_workers = 5
|
|||
|
||||
# adjust stylesheets to rtl (requires "rtlit" gem)
|
||||
rtl_css = false
|
||||
|
||||
# notify admin when a new version of discourse is released
|
||||
# this is global so it is easier to set in multisites
|
||||
# TODO allow for global overrides
|
||||
new_version_emails = true
|
||||
|
|
Loading…
Reference in a new issue