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:
@@ -210,7 +210,7 @@ class Conversation < ApplicationRecord
|
||||
|
||||
def mark_conversation_pending_if_bot
|
||||
# TODO: make this an inbox config instead of assuming bot conversations should start as pending
|
||||
self.status = :pending if inbox.agent_bot_inbox&.active? || inbox.hooks.pluck(:app_id).include?('dialogflow')
|
||||
self.status = :pending if inbox.active_bot?
|
||||
end
|
||||
|
||||
def notify_conversation_creation
|
||||
|
||||
Reference in New Issue
Block a user