Просмотр исходного кода

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 6 лет назад
Родитель
Сommit
8c9ba325ca
1 измененных файлов: 9 добавлений и 1 удалений
  1. 9
    1
      react/features/base/conference/middleware.js

+ 9
- 1
react/features/base/conference/middleware.js Просмотреть файл

390
         const local
390
         const local
391
             = (participantById && participantById.local)
391
             = (participantById && participantById.local)
392
                 || (!id && pinnedParticipant && pinnedParticipant.local);
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
         sendAnalytics(createPinnedEvent(
402
         sendAnalytics(createPinnedEvent(
395
             actionName,
403
             actionName,
396
-            local ? 'local' : id,
404
+            participantIdForEvent,
397
             {
405
             {
398
                 local,
406
                 local,
399
                 'participant_count': conference.getParticipantCount()
407
                 'participant_count': conference.getParticipantCount()

Загрузка…
Отмена
Сохранить