chore: Refactor the notification service for participants (#6461)

This commit is contained in:
Pranav Raj S
2023-02-15 14:14:56 -08:00
committed by GitHub
parent d6baa5db85
commit 949ddf68ba
8 changed files with 215 additions and 45 deletions

View File

@@ -106,6 +106,10 @@ class Inbox < ApplicationRecord
channel_type == 'Channel::Whatsapp'
end
def assignable_agents
(account.users.where(id: members.select(:user_id)) + account.administrators).uniq
end
def active_bot?
agent_bot_inbox&.active? || hooks.pluck(:app_id).include?('dialogflow')
end