chore: Mark conversations as pending instead of reopen when bot is present (#5751)
With this change, conversations are marked as pending instead of reopening when a bot is connected to that Inbox. Fixes: #5668
This commit is contained in:
@@ -101,6 +101,10 @@ class Inbox < ApplicationRecord
|
||||
channel_type == 'Channel::Whatsapp'
|
||||
end
|
||||
|
||||
def active_bot?
|
||||
agent_bot_inbox&.active? || hooks.pluck(:app_id).include?('dialogflow')
|
||||
end
|
||||
|
||||
def inbox_type
|
||||
channel.name
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user