discourse/db/fixtures/990_settings.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
408 B
Ruby
Raw Normal View History

# frozen_string_literal: true
if SiteSetting.notification_email == SiteSetting.defaults[:notification_email]
# don't crash for invalid hostname, which is possible in dev
begin
SiteSetting.notification_email = "noreply@#{Discourse.current_hostname}"
rescue Discourse::InvalidParameters
STDERR.puts "Discourse hostname: #{Discourse.current_hostname} is not a valid domain for emails!"
end
end