Chore: Add a real-time event for contact resolution/update (#696)

* Chore: Add a real-time event for contact resolution/update
* Chore: Ensure Events are sent to administrators

Addresses: #419
This commit is contained in:
Sojan Jose
2020-04-18 13:47:51 +05:30
committed by GitHub
parent 818c769bb7
commit ecccb103a0
7 changed files with 96 additions and 26 deletions

View File

@@ -38,9 +38,12 @@ class Account < ApplicationRecord
after_create :notify_creation
after_destroy :notify_deletion
def channel
# This should be unique for account
'test_channel'
def agents
users.where(account_users: { role: :agent })
end
def administrators
users.where(account_users: { role: :administrator })
end
def all_conversation_tags