rn,conference: log pin participant analytics events also on mobile

This commit is contained in:
Saúl Ibarra Corretgé 2019-07-30 15:26:30 +02:00 committed by Saúl Ibarra Corretgé
parent 5261f61110
commit 4d5332cadf
1 changed files with 19 additions and 22 deletions

View File

@ -435,8 +435,6 @@ function _pinParticipant({ getState }, next, action) {
const participants = state['features/base/participants']; const participants = state['features/base/participants'];
const id = action.participant.id; const id = action.participant.id;
const participantById = getParticipantById(participants, id); const participantById = getParticipantById(participants, id);
if (typeof APP !== 'undefined') {
const pinnedParticipant = getPinnedParticipant(participants); const pinnedParticipant = getPinnedParticipant(participants);
const actionName = id ? ACTION_PINNED : ACTION_UNPINNED; const actionName = id ? ACTION_PINNED : ACTION_UNPINNED;
const local const local
@ -447,8 +445,8 @@ function _pinParticipant({ getState }, next, action) {
if (local) { if (local) {
participantIdForEvent = local; participantIdForEvent = local;
} else { } else {
participantIdForEvent = actionName === ACTION_PINNED participantIdForEvent
? id : pinnedParticipant && pinnedParticipant.id; = actionName === ACTION_PINNED ? id : pinnedParticipant && pinnedParticipant.id;
} }
sendAnalytics(createPinnedEvent( sendAnalytics(createPinnedEvent(
@ -458,7 +456,6 @@ function _pinParticipant({ getState }, next, action) {
local, local,
'participant_count': conference.getParticipantCount() 'participant_count': conference.getParticipantCount()
})); }));
}
return next(action); return next(action);
} }