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 b2442f25189bd2f8c56e8489a5c5e2b2a5576227..6cf7ead412cdd6b75c5fd581e6a65f2d0e35ac03 100755 --- a/bigbluebutton-html5/imports/ui/components/chat/chat-dropdown/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/chat/chat-dropdown/component.jsx @@ -31,6 +31,9 @@ const intlMessages = defineMessages({ }, }); +const CHAT_CONFIG = Meteor.settings.public.chat; +const ENABLE_SAVE_AND_COPY_PUBLIC_CHAT = CHAT_CONFIG.enableSaveAndCopyPublicChat; + class ChatDropdown extends PureComponent { constructor(props) { super(props); @@ -82,13 +85,21 @@ class ChatDropdown extends PureComponent { getAvailableActions() { const { - intl, isMeteorConnected, amIModerator, meetingIsBreakout, meetingName, timeWindowsValues, users, + intl, + isMeteorConnected, + amIModerator, + meetingIsBreakout, + meetingName, + timeWindowsValues, + users, } = this.props; const clearIcon = 'delete'; const saveIcon = 'download'; const copyIcon = 'copy'; return _.compact([ + ENABLE_SAVE_AND_COPY_PUBLIC_CHAT + && ( <DropdownListItem data-test="chatSave" icon={saveIcon} @@ -103,19 +114,23 @@ class ChatDropdown extends PureComponent { link.setAttribute('download', `bbb-${meetingName}[public-chat]_${dateString}.txt`); link.setAttribute( 'href', - `data: ${mimeType} ;charset=utf-8,`+ - `${encodeURIComponent(ChatService.exportChat(timeWindowsValues, users, intl))}`, + `data: ${mimeType} ;charset=utf-8,` + + `${encodeURIComponent(ChatService.exportChat(timeWindowsValues, users, intl))}`, ); link.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window })); }} - />, + /> + ), + ENABLE_SAVE_AND_COPY_PUBLIC_CHAT + && ( <DropdownListItem data-test="chatCopy" icon={copyIcon} id="clipboardButton" label={intl.formatMessage(intlMessages.copy)} key={this.actionsKey[1]} - />, + /> + ), !meetingIsBreakout && amIModerator && isMeteorConnected ? ( <DropdownListItem data-test="chatClear" diff --git a/bigbluebutton-html5/private/config/settings.yml b/bigbluebutton-html5/private/config/settings.yml index 10bc805d1017e1f8c0a129bcd3bb7fce46d61a45..c30d4ecea08ed44026dcbed22fff1dfdc176e3ca 100755 --- a/bigbluebutton-html5/private/config/settings.yml +++ b/bigbluebutton-html5/private/config/settings.yml @@ -396,6 +396,7 @@ public: enabled: true itemsPerPage: 100 timeBetweenFetchs: 1000 + enableSaveAndCopyPublicChat: false bufferChatInsertsMs: 0 startClosed: false min_message_length: 1