diff --git a/react/features/base/conference/functions.js b/react/features/base/conference/functions.js index 5d16ac5ee..7d41cf115 100644 --- a/react/features/base/conference/functions.js +++ b/react/features/base/conference/functions.js @@ -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. * diff --git a/react/features/conference/components/web/Conference.js b/react/features/conference/components/web/Conference.js index c54c611c8..337ba0ae0 100644 --- a/react/features/conference/components/web/Conference.js +++ b/react/features/conference/components/web/Conference.js @@ -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 { * @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) }; }