chore: Add reauthorization prompt for Whatsapp Channel (#5929)

- Add reauthorization prompt for Whatsapp Channel

fixes: #5782
This commit is contained in:
Sojan Jose
2022-11-24 11:50:32 +00:00
committed by GitHub
parent 606fc9046a
commit 8ea0660862
11 changed files with 148 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ class Webhooks::WhatsappEventsJob < ApplicationJob
def perform(params = {})
channel = find_channel_from_whatsapp_business_payload(params) || find_channel(params)
return if channel.blank?
return if channel.reauthorization_required?
case channel.provider
when 'whatsapp_cloud'