浏览代码

Fix JitsiConference access

With so many abstractions called conference, I'm not surprised I made a
mistake and my reviewer didn't catch it.

As we are transitioning from remote participants identified by ID alone
to an ID-conference pair, the subsequent commits "Protect against late
PARTICIPANT_JOINED" and "Refine PARTICIPANT_LEFT for ID collisions"
caught the error.
master
Lyubo Marinov 7 年前
父节点
当前提交
fa9549582f
共有 2 个文件被更改,包括 9 次插入6 次删除
  1. 7
    2
      modules/UI/shared_video/SharedVideo.js
  2. 2
    4
      react/features/base/participants/actions.js

+ 7
- 2
modules/UI/shared_video/SharedVideo.js 查看文件

@@ -306,7 +306,12 @@ export default class SharedVideoManager {
306 306
                 SHARED_VIDEO_CONTAINER_TYPE, self.sharedVideo);
307 307
 
308 308
             APP.store.dispatch(participantJoined({
309
-                conference: APP.conference,
309
+
310
+                // FIXME The cat is out of the bag already or rather _room is
311
+                // not private because it is used in multiple other places
312
+                // already such as AbstractPageReloadOverlay and
313
+                // JitsiMeetLogStorage.
314
+                conference: APP.conference._room,
310 315
                 id: self.url,
311 316
                 isBot: true,
312 317
                 name: 'YouTube'
@@ -517,7 +522,7 @@ export default class SharedVideoManager {
517 522
                     UIEvents.UPDATE_SHARED_VIDEO, null, 'removed');
518 523
             });
519 524
 
520
-        APP.store.dispatch(participantLeft(this.url, APP.conference));
525
+        APP.store.dispatch(participantLeft(this.url, APP.conference._room));
521 526
 
522 527
         this.url = null;
523 528
         this.isSharedVideoShown = false;

+ 2
- 4
react/features/base/participants/actions.js 查看文件

@@ -2,6 +2,7 @@
2 2
 
3 3
 import throttle from 'lodash/throttle';
4 4
 
5
+import { set } from '../redux';
5 6
 import { showNotification } from '../../notifications';
6 7
 
7 8
 import {
@@ -113,10 +114,7 @@ export function localParticipantIdChanged(id) {
113 114
  * }}
114 115
  */
115 116
 export function localParticipantJoined(participant = {}) {
116
-    return participantJoined({
117
-        ...participant,
118
-        local: true
119
-    });
117
+    return participantJoined(set(participant, 'local', true));
120 118
 }
121 119
 
122 120
 /**

正在加载...
取消
保存