chore: Support Email should give priority to environment variable (#4270)

Account.support_email should give priority to environment variables over installation config

Fixes: #3304
This commit is contained in:
Sojan Jose
2022-03-25 16:13:45 +05:30
committed by GitHub
parent 5da0b0667f
commit ff881fcad9

View File

@@ -111,7 +111,7 @@ class Account < ApplicationRecord
end
def support_email
super || GlobalConfig.get('MAILER_SUPPORT_EMAIL')['MAILER_SUPPORT_EMAIL'] || ENV.fetch('MAILER_SENDER_EMAIL', 'Chatwoot <accounts@chatwoot.com>')
super || ENV['MAILER_SENDER_EMAIL'] || GlobalConfig.get('MAILER_SUPPORT_EMAIL')['MAILER_SUPPORT_EMAIL']
end
def usage_limits