feat: Notification on new messages in conversation (#1204)
fixes: #895 fixes: #1118 fixes: #1075 Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
@@ -50,7 +50,13 @@ class ApplicationMailer < ActionMailer::Base
|
||||
}
|
||||
end
|
||||
|
||||
def locale_from_account(account)
|
||||
I18n.available_locales.map(&:to_s).include?(account.locale) ? account.locale : nil
|
||||
end
|
||||
|
||||
def ensure_current_account(account)
|
||||
Current.account = account if account.present?
|
||||
locale ||= locale_from_account(account) if account.present?
|
||||
I18n.locale = locale || I18n.default_locale
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user