fix: Handle PermissionDeniedError for Dialogflow processor (#8252)

This commit is contained in:
Pranav Raj S
2023-10-30 13:24:03 -07:00
committed by GitHub
parent 013dab7da6
commit 653e0335c0
8 changed files with 82 additions and 20 deletions

View File

@@ -129,7 +129,7 @@ class Inbox < ApplicationRecord
end
def active_bot?
agent_bot_inbox&.active? || hooks.pluck(:app_id).include?('dialogflow')
agent_bot_inbox&.active? || hooks.where(app_id: 'dialogflow', status: 'enabled').count.positive?
end
def inbox_type