Browse Source

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 years ago
parent
commit
8c9ba325ca
1 changed files with 9 additions and 1 deletions
  1. 9
    1
      react/features/base/conference/middleware.js

+ 9
- 1
react/features/base/conference/middleware.js View File

@@ -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()

Loading…
Cancel
Save