From bf6bbfca69e6dc2cd9c5961ae76b5b0a687cb864 Mon Sep 17 00:00:00 2001
From: Tainan Felipe <tainanfelipe214@gmail.com>
Date: Fri, 4 Jun 2021 15:51:29 -0300
Subject: [PATCH] Add conditional to don't show dropdown when no opition
 avaible

---
 .../imports/ui/components/chat/chat-dropdown/component.jsx | 7 +++++--
 bigbluebutton-html5/private/config/settings.yml            | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/bigbluebutton-html5/imports/ui/components/chat/chat-dropdown/component.jsx b/bigbluebutton-html5/imports/ui/components/chat/chat-dropdown/component.jsx
index 6cf7ead412..7721a834ff 100755
--- a/bigbluebutton-html5/imports/ui/components/chat/chat-dropdown/component.jsx
+++ b/bigbluebutton-html5/imports/ui/components/chat/chat-dropdown/component.jsx
@@ -144,11 +144,14 @@ class ChatDropdown extends PureComponent {
   }
 
   render() {
-    const { intl } = this.props;
+    const {
+      intl,
+      amIModerator,
+    } = this.props;
     const { isSettingOpen } = this.state;
 
     const availableActions = this.getAvailableActions();
-
+    if (!amIModerator && !ENABLE_SAVE_AND_COPY_PUBLIC_CHAT) return null;
     return (
       <Dropdown
         isOpen={isSettingOpen}
diff --git a/bigbluebutton-html5/private/config/settings.yml b/bigbluebutton-html5/private/config/settings.yml
index c30d4ecea0..189402865f 100755
--- a/bigbluebutton-html5/private/config/settings.yml
+++ b/bigbluebutton-html5/private/config/settings.yml
@@ -396,7 +396,7 @@ public:
     enabled: true
     itemsPerPage: 100
     timeBetweenFetchs: 1000
-    enableSaveAndCopyPublicChat: false
+    enableSaveAndCopyPublicChat: true
     bufferChatInsertsMs: 0
     startClosed: false
     min_message_length: 1
-- 
GitLab