From cc85a33c7d1a59da08fe8623caa1a99f6f0a66b4 Mon Sep 17 00:00:00 2001 From: Tainan Felipe Date: Tue, 22 Aug 2023 16:27:18 -0300 Subject: [PATCH] Add Fix for users that change role --- .../ui/components/components-data/chat-context/adapter.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/ui/components/components-data/chat-context/adapter.jsx b/bigbluebutton-html5/imports/ui/components/components-data/chat-context/adapter.jsx index e683391a53..b14e131d2f 100644 --- a/bigbluebutton-html5/imports/ui/components/components-data/chat-context/adapter.jsx +++ b/bigbluebutton-html5/imports/ui/components/components-data/chat-context/adapter.jsx @@ -19,7 +19,7 @@ const TIME_BETWEEN_FETCHS = CHAT_CONFIG.timeBetweenFetchs; const EVENT_NAME = 'bbb-group-chat-messages-subscription-has-stoppped'; const EVENT_NAME_SUBSCRIPTION_READY = 'bbb-group-chat-messages-subscriptions-ready'; -const referenceIds = {}; +let referenceIds = {}; const getMessagesBeforeJoinCounter = async () => { const counter = await makeCall('chatMessageBeforeJoinCounter'); @@ -108,6 +108,7 @@ const Adapter = () => { if (users[Auth.meetingID] && users[Auth.meetingID][Auth.userID]) { if (currentUserData?.role !== users[Auth.meetingID][Auth.userID]?.role) { prevUserData = currentUserData; + referenceIds = {}; } currentUserData = users[Auth.meetingID][Auth.userID]; }