瀏覽代碼

fix(rn,external_api) skip participant notifications when not in a meeting

master
Saúl Ibarra Corretgé 4 年之前
父節點
當前提交
8db6e783f1
共有 1 個檔案被更改,包括 9 行新增9 行删除
  1. 9
    9
      react/features/mobile/external-api/middleware.js

+ 9
- 9
react/features/mobile/external-api/middleware.js 查看文件

@@ -189,20 +189,20 @@ MiddlewareRegistry.register(store => next => action => {
189 189
 
190 190
     case PARTICIPANT_JOINED:
191 191
     case PARTICIPANT_LEFT: {
192
+        // Skip these events while not in a conference. SDK users can still retrieve them.
193
+        const { conference } = store.getState()['features/base/conference'];
194
+
195
+        if (!conference) {
196
+            break;
197
+        }
198
+
192 199
         const { participant } = action;
193 200
 
194 201
         sendEvent(
195 202
             store,
196 203
             action.type,
197
-            /* data */ {
198
-                isLocal: participant.local,
199
-                email: participant.email,
200
-                name: participant.name,
201
-                participantId: participant.id,
202
-                displayName: participant.displayName,
203
-                avatarUrl: participant.avatarURL,
204
-                role: participant.role
205
-            });
204
+            _participantToParticipantInfo(participant) /* data */
205
+        );
206 206
         break;
207 207
     }
208 208
 

Loading…
取消
儲存