feat: Update notifications and unread count in real time (#4261)
This commit is contained in:
@@ -22,6 +22,7 @@ class ActionCableConnector extends BaseActionCableConnector {
|
||||
'contact.deleted': this.onContactDelete,
|
||||
'contact.updated': this.onContactUpdate,
|
||||
'conversation.mentioned': this.onConversationMentioned,
|
||||
'notification.created': this.onNotificationCreated,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -134,6 +135,10 @@ class ActionCableConnector extends BaseActionCableConnector {
|
||||
onContactUpdate = data => {
|
||||
this.app.$store.dispatch('contacts/updateContact', data);
|
||||
};
|
||||
|
||||
onNotificationCreated = data => {
|
||||
this.app.$store.dispatch('notifications/addNotification', data);
|
||||
};
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user