fix(document.title): use URL decoded room name.

This commit is contained in:
Hristo Terezov 2020-04-25 09:36:14 -05:00
parent 851976ebdf
commit 94a15914d0
2 changed files with 14 additions and 6 deletions

View File

@ -167,6 +167,17 @@ export function getConferenceName(stateful: Function | Object): string {
|| safeStartCase(safeDecodeURIComponent(room));
}
/**
* Returns the name of the conference formated for the title.
*
* @param {Function | Object} stateful - Reference that can be resolved to Redux state with the {@code toState}
* function.
* @returns {string} - The name of the conference formated for the title.
*/
export function getConferenceNameForTitle(stateful: Function | Object) {
return safeStartCase(safeDecodeURIComponent(toState(stateful)['features/base/conference'].room));
}
/**
* Returns the UTC timestamp when the first participant joined the conference.
*

View File

@ -8,7 +8,7 @@ import VideoLayout from '../../../../../modules/UI/videolayout/VideoLayout';
import { connect, disconnect } from '../../../base/connection';
import { translate } from '../../../base/i18n';
import { connect as reactReduxConnect } from '../../../base/redux';
import { getBackendSafeRoomName } from '../../../base/util';
import { getConferenceNameForTitle } from '../../../base/conference';
import { Chat } from '../../../chat';
import { Filmstrip } from '../../../filmstrip';
import { CalleeInfoContainer } from '../../../invite';
@ -264,14 +264,11 @@ class Conference extends AbstractConference<Props, *> {
* @returns {Props}
*/
function _mapStateToProps(state) {
const currentLayout = getCurrentLayout(state);
const roomName = getBackendSafeRoomName(state['features/base/conference'].room);
return {
...abstractMapStateToProps(state),
_iAmRecorder: state['features/base/config'].iAmRecorder,
_layoutClassName: LAYOUT_CLASSNAMES[currentLayout],
_roomName: roomName
_layoutClassName: LAYOUT_CLASSNAMES[getCurrentLayout(state)],
_roomName: getConferenceNameForTitle(state)
};
}