|
|
@@ -435,31 +435,28 @@ function _pinParticipant({ getState }, next, action) {
|
|
435
|
435
|
const participants = state['features/base/participants'];
|
|
436
|
436
|
const id = action.participant.id;
|
|
437
|
437
|
const participantById = getParticipantById(participants, id);
|
|
438
|
|
-
|
|
439
|
|
- if (typeof APP !== 'undefined') {
|
|
440
|
|
- const pinnedParticipant = getPinnedParticipant(participants);
|
|
441
|
|
- const actionName = id ? ACTION_PINNED : ACTION_UNPINNED;
|
|
442
|
|
- const local
|
|
443
|
|
- = (participantById && participantById.local)
|
|
444
|
|
- || (!id && pinnedParticipant && pinnedParticipant.local);
|
|
445
|
|
- let participantIdForEvent;
|
|
446
|
|
-
|
|
447
|
|
- if (local) {
|
|
448
|
|
- participantIdForEvent = local;
|
|
449
|
|
- } else {
|
|
450
|
|
- participantIdForEvent = actionName === ACTION_PINNED
|
|
451
|
|
- ? id : pinnedParticipant && pinnedParticipant.id;
|
|
452
|
|
- }
|
|
453
|
|
-
|
|
454
|
|
- sendAnalytics(createPinnedEvent(
|
|
455
|
|
- actionName,
|
|
456
|
|
- participantIdForEvent,
|
|
457
|
|
- {
|
|
458
|
|
- local,
|
|
459
|
|
- 'participant_count': conference.getParticipantCount()
|
|
460
|
|
- }));
|
|
|
438
|
+ const pinnedParticipant = getPinnedParticipant(participants);
|
|
|
439
|
+ const actionName = id ? ACTION_PINNED : ACTION_UNPINNED;
|
|
|
440
|
+ const local
|
|
|
441
|
+ = (participantById && participantById.local)
|
|
|
442
|
+ || (!id && pinnedParticipant && pinnedParticipant.local);
|
|
|
443
|
+ let participantIdForEvent;
|
|
|
444
|
+
|
|
|
445
|
+ if (local) {
|
|
|
446
|
+ participantIdForEvent = local;
|
|
|
447
|
+ } else {
|
|
|
448
|
+ participantIdForEvent
|
|
|
449
|
+ = actionName === ACTION_PINNED ? id : pinnedParticipant && pinnedParticipant.id;
|
|
461
|
450
|
}
|
|
462
|
451
|
|
|
|
452
|
+ sendAnalytics(createPinnedEvent(
|
|
|
453
|
+ actionName,
|
|
|
454
|
+ participantIdForEvent,
|
|
|
455
|
+ {
|
|
|
456
|
+ local,
|
|
|
457
|
+ 'participant_count': conference.getParticipantCount()
|
|
|
458
|
+ }));
|
|
|
459
|
+
|
|
463
|
460
|
return next(action);
|
|
464
|
461
|
}
|
|
465
|
462
|
|