Explorar el Código

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

j8
Hristo Terezov hace 5 años
padre
commit
94a15914d0

+ 11
- 0
react/features/base/conference/functions.js Ver fichero

@@ -167,6 +167,17 @@ export function getConferenceName(stateful: Function | Object): string {
167 167
         || safeStartCase(safeDecodeURIComponent(room));
168 168
 }
169 169
 
170
+/**
171
+ * Returns the name of the conference formated for the title.
172
+ *
173
+ * @param {Function | Object} stateful - Reference that can be resolved to Redux state with the {@code toState}
174
+ * function.
175
+ * @returns {string} - The name of the conference formated for the title.
176
+ */
177
+export function getConferenceNameForTitle(stateful: Function | Object) {
178
+    return safeStartCase(safeDecodeURIComponent(toState(stateful)['features/base/conference'].room));
179
+}
180
+
170 181
 /**
171 182
 * Returns the UTC timestamp when the first participant joined the conference.
172 183
 *

+ 3
- 6
react/features/conference/components/web/Conference.js Ver fichero

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

Loading…
Cancelar
Guardar