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.
This commit is contained in:
Leonard Kim 2019-01-11 10:08:05 -08:00 committed by Saúl Ibarra Corretgé
parent 693d4357a0
commit 8c9ba325ca
1 changed files with 9 additions and 1 deletions

View File

@ -390,10 +390,18 @@ function _pinParticipant({ getState }, next, action) {
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,
local ? 'local' : id,
participantIdForEvent,
{
local,
'participant_count': conference.getParticipantCount()