From ea7e9dfaa2f4cd300207f6960129f02747356bb1 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 3 Feb 2025 17:25:01 +0530 Subject: [PATCH] feat: handle team changed specifically --- app/javascript/dashboard/helper/actionCable.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/javascript/dashboard/helper/actionCable.js b/app/javascript/dashboard/helper/actionCable.js index adb33eb6d..411a9f924 100644 --- a/app/javascript/dashboard/helper/actionCable.js +++ b/app/javascript/dashboard/helper/actionCable.js @@ -29,6 +29,7 @@ class ActionCableConnector extends BaseActionCableConnector { 'notification.updated': this.onNotificationUpdated, 'conversation.read': this.onConversationRead, 'conversation.updated': this.onConversationUpdated, + 'team.changed': this.onTeamChanged, 'account.cache_invalidated': this.onCacheInvalidate, }; } @@ -114,6 +115,11 @@ class ActionCableConnector extends BaseActionCableConnector { this.fetchConversationStats(); }; + onTeamChanged = data => { + this.app.$store.dispatch('updateConversation', data); + this.fetchConversationStats(); + }; + onTypingOn = ({ conversation, user }) => { const conversationId = conversation.id;