chore: Add reauthorization prompt for Whatsapp Channel (#5929)
- Add reauthorization prompt for Whatsapp Channel fixes: #5782
This commit is contained in:
@@ -39,11 +39,14 @@ module Reauthorizable
|
||||
def prompt_reauthorization!
|
||||
::Redis::Alfred.set(reauthorization_required_key, true)
|
||||
|
||||
if (is_a? Integrations::Hook) && slack?
|
||||
AdministratorNotifications::ChannelNotificationsMailer.with(account: account).slack_disconnect.deliver_later
|
||||
elsif is_a? Channel::FacebookPage
|
||||
case self.class.name
|
||||
when 'Integrations::Hook'
|
||||
AdministratorNotifications::ChannelNotificationsMailer.with(account: account).slack_disconnect.deliver_later if slack?
|
||||
when 'Channel::FacebookPage'
|
||||
AdministratorNotifications::ChannelNotificationsMailer.with(account: account).facebook_disconnect(inbox).deliver_later
|
||||
elsif is_a? Channel::Email
|
||||
when 'Channel::Whatsapp'
|
||||
AdministratorNotifications::ChannelNotificationsMailer.with(account: account).whatsapp_disconnect(inbox).deliver_later
|
||||
when 'Channel::Email'
|
||||
AdministratorNotifications::ChannelNotificationsMailer.with(account: account).email_disconnect(inbox).deliver_later
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user