Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

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

Hristo Terezov94a15914d037
diff --git a/react/features/base/conference/functions.js b/react/features/base/conference/functions.js
index 5d16ac5ee9..7d41cf115b 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 c54c611c80..337ba0ae03 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<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)
};
}