浏览代码

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
                 SHARED_VIDEO_CONTAINER_TYPE, self.sharedVideo);
306
                 SHARED_VIDEO_CONTAINER_TYPE, self.sharedVideo);
307
 
307
 
308
             APP.store.dispatch(participantJoined({
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
                 id: self.url,
315
                 id: self.url,
311
                 isBot: true,
316
                 isBot: true,
312
                 name: 'YouTube'
317
                 name: 'YouTube'
517
                     UIEvents.UPDATE_SHARED_VIDEO, null, 'removed');
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
         this.url = null;
527
         this.url = null;
523
         this.isSharedVideoShown = false;
528
         this.isSharedVideoShown = false;

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

2
 
2
 
3
 import throttle from 'lodash/throttle';
3
 import throttle from 'lodash/throttle';
4
 
4
 
5
+import { set } from '../redux';
5
 import { showNotification } from '../../notifications';
6
 import { showNotification } from '../../notifications';
6
 
7
 
7
 import {
8
 import {
113
  * }}
114
  * }}
114
  */
115
  */
115
 export function localParticipantJoined(participant = {}) {
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
 /**

正在加载...
取消
保存