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 id = action.participant.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') {
|
||||
const pinnedParticipant = getPinnedParticipant(participants);
|
||||
const actionName = id ? ACTION_PINNED : ACTION_UNPINNED;
|
||||
const local
|
||||
= (participantById && participantById.local)
|
||||
|| (!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()
|
||||
}));
|
||||
if (local) {
|
||||
participantIdForEvent = local;
|
||||
} else {
|
||||
participantIdForEvent
|
||||
= actionName === ACTION_PINNED ? id : pinnedParticipant && pinnedParticipant.id;
|
||||
}
|
||||
|
||||
sendAnalytics(createPinnedEvent(
|
||||
actionName,
|
||||
participantIdForEvent,
|
||||
{
|
||||
local,
|
||||
'participant_count': conference.getParticipantCount()
|
||||
}));
|
||||
|
||||
return next(action);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue