From 4b9d695069305623101b7e42fff774b71cda4d84 Mon Sep 17 00:00:00 2001
From: Philipp Memmel <philipp.memmel@thg.muenchen.musin.de>
Date: Sun, 11 Apr 2021 21:12:59 +0200
Subject: [PATCH] fix private public chat lock interference

---
 bigbluebutton-html5/imports/ui/components/chat/container.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bigbluebutton-html5/imports/ui/components/chat/container.jsx b/bigbluebutton-html5/imports/ui/components/chat/container.jsx
index 5fcad9215a..ad9f6559ed 100755
--- a/bigbluebutton-html5/imports/ui/components/chat/container.jsx
+++ b/bigbluebutton-html5/imports/ui/components/chat/container.jsx
@@ -229,7 +229,8 @@ const ChatContainer = (props) => {
 
 export default lockContextContainer(injectIntl(withTracker(({ intl, userLocks }) => {
   const chatID = Session.get('idChatOpen');
-  const isChatLocked = userLocks.userPrivateChat || userLocks.userPublicChat;
+  const isChatLocked = (userLocks.userPrivateChat && chatID !== PUBLIC_CHAT_KEY)
+      || (userLocks.userPublicChat && chatID === PUBLIC_CHAT_KEY);
 
   if (!chatID) {
     // No chatID is set so the panel is closed, about to close, or wasn't opened correctly
-- 
GitLab