diff --git a/app/javascript/dashboard/helper/actionCable.js b/app/javascript/dashboard/helper/actionCable.js index adb33eb6d..b8467fe01 100644 --- a/app/javascript/dashboard/helper/actionCable.js +++ b/app/javascript/dashboard/helper/actionCable.js @@ -17,6 +17,7 @@ class ActionCableConnector extends BaseActionCableConnector { 'user:logout': this.onLogout, 'page:reload': this.onReload, 'assignee.changed': this.onAssigneeChanged, + 'team.changed': this.onTeamChanged, 'conversation.typing_on': this.onTypingOn, 'conversation.typing_off': this.onTypingOff, 'conversation.contact_changed': this.onConversationContactChange, @@ -76,6 +77,14 @@ class ActionCableConnector extends BaseActionCableConnector { this.fetchConversationStats(); }; + onTeamChanged = payload => { + const { id } = payload; + if (id) { + this.app.$store.dispatch('updateConversation', payload); + } + this.fetchConversationStats(); + }; + onConversationCreated = data => { this.app.$store.dispatch('addConversation', data); this.fetchConversationStats();