chore: Fix emails being sent with the wrong translations (#2236)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Sojan Jose
2021-06-08 22:45:01 +05:30
committed by GitHub
parent 67ce6f5704
commit 1bf7227843
15 changed files with 75 additions and 38 deletions

View File

@@ -36,7 +36,9 @@ module Reauthorizable
# could used to manually prompt reauthorization if auth scope changes
def prompt_reauthorization!
::Redis::Alfred.set(reauthorization_required_key, true)
AdministratorNotifications::ChannelNotificationsMailer.slack_disconnect(account)&.deliver_later if (is_a? Integrations::Hook) && slack?
return unless (is_a? Integrations::Hook) && slack?
AdministratorNotifications::ChannelNotificationsMailer.with(account: account).slack_disconnect(account)&.deliver_later
end
# call this after you successfully Reauthorized the object in UI