feat: notify on slack disconnect (#1323)

This commit is contained in:
Abhishek
2020-10-28 02:52:57 +08:00
committed by GitHub
parent 9045b8d9ca
commit ff96d43953
6 changed files with 58 additions and 7 deletions

View File

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