浏览代码

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

master
Hristo Terezov 5 年前
父节点
当前提交
94a15914d0
共有 2 个文件被更改,包括 14 次插入6 次删除
  1. 11
    0
      react/features/base/conference/functions.js
  2. 3
    6
      react/features/conference/components/web/Conference.js

+ 11
- 0
react/features/base/conference/functions.js 查看文件

167
         || safeStartCase(safeDecodeURIComponent(room));
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
 * Returns the UTC timestamp when the first participant joined the conference.
182
 * Returns the UTC timestamp when the first participant joined the conference.
172
 *
183
 *

+ 3
- 6
react/features/conference/components/web/Conference.js 查看文件

8
 import { connect, disconnect } from '../../../base/connection';
8
 import { connect, disconnect } from '../../../base/connection';
9
 import { translate } from '../../../base/i18n';
9
 import { translate } from '../../../base/i18n';
10
 import { connect as reactReduxConnect } from '../../../base/redux';
10
 import { connect as reactReduxConnect } from '../../../base/redux';
11
-import { getBackendSafeRoomName } from '../../../base/util';
11
+import { getConferenceNameForTitle } from '../../../base/conference';
12
 import { Chat } from '../../../chat';
12
 import { Chat } from '../../../chat';
13
 import { Filmstrip } from '../../../filmstrip';
13
 import { Filmstrip } from '../../../filmstrip';
14
 import { CalleeInfoContainer } from '../../../invite';
14
 import { CalleeInfoContainer } from '../../../invite';
264
  * @returns {Props}
264
  * @returns {Props}
265
  */
265
  */
266
 function _mapStateToProps(state) {
266
 function _mapStateToProps(state) {
267
-    const currentLayout = getCurrentLayout(state);
268
-    const roomName = getBackendSafeRoomName(state['features/base/conference'].room);
269
-
270
     return {
267
     return {
271
         ...abstractMapStateToProps(state),
268
         ...abstractMapStateToProps(state),
272
         _iAmRecorder: state['features/base/config'].iAmRecorder,
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
 

正在加载...
取消
保存