rn,conference: log pin participant analytics events also on mobile
This commit is contained in:
parent
5261f61110
commit
4d5332cadf
|
@ -435,31 +435,28 @@ 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);
|
||||||
|
const pinnedParticipant = getPinnedParticipant(participants);
|
||||||
|
const actionName = id ? ACTION_PINNED : ACTION_UNPINNED;
|
||||||
|
const local
|
||||||
|
= (participantById && participantById.local)
|
||||||
|
|| (!id && pinnedParticipant && pinnedParticipant.local);
|
||||||
|
let participantIdForEvent;
|
||||||
|
|
||||||
if (typeof APP !== 'undefined') {
|
if (local) {
|
||||||
const pinnedParticipant = getPinnedParticipant(participants);
|
participantIdForEvent = local;
|
||||||
const actionName = id ? ACTION_PINNED : ACTION_UNPINNED;
|
} else {
|
||||||
const local
|
participantIdForEvent
|
||||||
= (participantById && participantById.local)
|
= actionName === ACTION_PINNED ? id : pinnedParticipant && pinnedParticipant.id;
|
||||||
|| (!id && pinnedParticipant && pinnedParticipant.local);
|
|
||||||
let participantIdForEvent;
|
|
||||||
|
|
||||||
if (local) {
|
|
||||||
participantIdForEvent = local;
|
|
||||||
} else {
|
|
||||||
participantIdForEvent = actionName === ACTION_PINNED
|
|
||||||
? id : pinnedParticipant && pinnedParticipant.id;
|
|
||||||
}
|
|
||||||
|
|
||||||
sendAnalytics(createPinnedEvent(
|
|
||||||
actionName,
|
|
||||||
participantIdForEvent,
|
|
||||||
{
|
|
||||||
local,
|
|
||||||
'participant_count': conference.getParticipantCount()
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sendAnalytics(createPinnedEvent(
|
||||||
|
actionName,
|
||||||
|
participantIdForEvent,
|
||||||
|
{
|
||||||
|
local,
|
||||||
|
'participant_count': conference.getParticipantCount()
|
||||||
|
}));
|
||||||
|
|
||||||
return next(action);
|
return next(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue