Feature: Availability Statuses (#874)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
@@ -18,6 +18,7 @@ class ActionCableConnector extends BaseActionCableConnector {
|
||||
'conversation.typing_on': this.onTypingOn,
|
||||
'conversation.typing_off': this.onTypingOff,
|
||||
'conversation.contact_changed': this.onConversationContactChange,
|
||||
'presence.update': this.onPresenceUpdate,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -29,6 +30,11 @@ class ActionCableConnector extends BaseActionCableConnector {
|
||||
this.app.$store.dispatch('updateMessage', data);
|
||||
};
|
||||
|
||||
onPresenceUpdate = data => {
|
||||
this.app.$store.dispatch('contacts/updatePresence', data.contacts);
|
||||
this.app.$store.dispatch('agents/updatePresence', data.users);
|
||||
};
|
||||
|
||||
onConversationContactChange = payload => {
|
||||
const { meta = {}, id: conversationId } = payload;
|
||||
const { sender } = meta || {};
|
||||
|
||||
Reference in New Issue
Block a user