浏览代码

fix(pinning): send a participant id on unpin

Analytics is erroring when unpinning because the logged
event sends null for the objectId. The objectId should
be the id of the person getting unpinned.
master
Leonard Kim 7 年前
父节点
当前提交
8c9ba325ca
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9
    1
      react/features/base/conference/middleware.js

+ 9
- 1
react/features/base/conference/middleware.js 查看文件

@@ -390,10 +390,18 @@ function _pinParticipant({ getState }, next, action) {
390 390
         const local
391 391
             = (participantById && participantById.local)
392 392
                 || (!id && pinnedParticipant && pinnedParticipant.local);
393
+        let participantIdForEvent;
394
+
395
+        if (local) {
396
+            participantIdForEvent = local;
397
+        } else {
398
+            participantIdForEvent = actionName === ACTION_PINNED
399
+                ? id : pinnedParticipant && pinnedParticipant.id;
400
+        }
393 401
 
394 402
         sendAnalytics(createPinnedEvent(
395 403
             actionName,
396
-            local ? 'local' : id,
404
+            participantIdForEvent,
397 405
             {
398 406
                 local,
399 407
                 'participant_count': conference.getParticipantCount()

正在加载...
取消
保存