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 73d65f226dac6720242a7032ad7696ef294fd4e5..c3188b8776082ce0be5581717835d84917455b82 100755 --- a/bigbluebutton-html5/imports/ui/components/chat/chat-dropdown/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/chat/chat-dropdown/component.jsx @@ -71,7 +71,9 @@ class ChatDropdown extends PureComponent { } getAvailableActions() { - const { intl, isMeteorConnected, amIModerator } = this.props; + const { + intl, isMeteorConnected, amIModerator, meetingName, + } = this.props; const clearIcon = 'delete'; const saveIcon = 'download'; @@ -86,8 +88,11 @@ class ChatDropdown extends PureComponent { onClick={() => { const link = document.createElement('a'); const mimeType = 'text/plain'; + const date = new Date(); + const time = `${date.getHours()}-${date.getMinutes()}`; + const dateString = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}_${time}`; - link.setAttribute('download', `public-chat-${Date.now()}.txt`); + link.setAttribute('download', `bbb-${meetingName}[public-chat]_${dateString}.txt`); link.setAttribute( 'href', `data: ${mimeType} ;charset=utf-8, diff --git a/bigbluebutton-html5/imports/ui/components/chat/chat-dropdown/container.jsx b/bigbluebutton-html5/imports/ui/components/chat/chat-dropdown/container.jsx new file mode 100644 index 0000000000000000000000000000000000000000..f00a5d6cc173a9276a4a19c549c70381b6af874c --- /dev/null +++ b/bigbluebutton-html5/imports/ui/components/chat/chat-dropdown/container.jsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { withTracker } from 'meteor/react-meteor-data'; +import Auth from '/imports/ui/services/auth'; +import Meetings from '/imports/api/meetings'; +import ChatDropdown from './component'; + +const ChatDropdownContainer = ({ ...props }) => <ChatDropdown {...props} />; + +export default withTracker(() => { + const getMeetingName = () => { + const m = Meetings.findOne({ meetingId: Auth.meetingID }, + { fields: { 'meetingProp.name': 1 } }); + return m.meetingProp.name; + }; + + return { + meetingName: getMeetingName(), + }; +})(ChatDropdownContainer); diff --git a/bigbluebutton-html5/imports/ui/components/chat/component.jsx b/bigbluebutton-html5/imports/ui/components/chat/component.jsx index 44a2f0c6c66909301972225434f652e8e01bd940..05654954fbaf54b4c144640963d67ce7f91d5968 100755 --- a/bigbluebutton-html5/imports/ui/components/chat/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/chat/component.jsx @@ -8,7 +8,7 @@ import withShortcutHelper from '/imports/ui/components/shortcut-help/service'; import { styles } from './styles.scss'; import MessageForm from './message-form/container'; import MessageList from './message-list/container'; -import ChatDropdown from './chat-dropdown/component'; +import ChatDropdownContainer from './chat-dropdown/container'; const ELEMENT_ID = 'chat-messages'; @@ -89,7 +89,12 @@ const Chat = (props) => { accessKey={CLOSE_CHAT_AK} /> ) - : <ChatDropdown isMeteorConnected={isMeteorConnected} amIModerator={amIModerator} /> + : ( + <ChatDropdownContainer + isMeteorConnected={isMeteorConnected} + amIModerator={amIModerator} + /> + ) } </header> <MessageList diff --git a/bigbluebutton-html5/imports/ui/components/user-list/service.js b/bigbluebutton-html5/imports/ui/components/user-list/service.js index 178deff67ddf2c3db946ac91250d9b223b6a38e3..1cc441d9a0257654f8f672a5ee7d1a66148ca3ff 100755 --- a/bigbluebutton-html5/imports/ui/components/user-list/service.js +++ b/bigbluebutton-html5/imports/ui/components/user-list/service.js @@ -510,7 +510,12 @@ export const getUserNamesLink = () => { .map(u => u.name) .join('\r\n'); const link = document.createElement('a'); - link.setAttribute('download', `save-users-list-${Date.now()}.txt`); + const meeting = Meetings.findOne({ meetingId: Auth.meetingID }, + { fields: { 'meetingProp.name': 1 } }); + const date = new Date(); + const time = `${date.getHours()}-${date.getMinutes()}`; + const dateString = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}_${time}`; + link.setAttribute('download', `bbb-${meeting.meetingProp.name}[users-list]_${dateString}.txt`); link.setAttribute( 'href', `data: ${mimeType} ;charset=utf-16,${encodeURIComponent(userNameListString)}`,