From cb35aa13f5fe0afe025b705f089ec1fcf64d2130 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 9 Jun 2021 17:55:55 -0600 Subject: [PATCH] lets it fall through conditions to fire the ParticipantsChanged event if an already pinned participant is found --- .../VideoCodec/ZoomRoom/ZoomRoom.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index a1f1dfd7..96d5c1c9 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -1347,10 +1347,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom Debug.Console(1, this, "Pin Status notification for UserId: {0}, ScreenIndex: {1}", status.PinnedUserId, status.ScreenIndex); + Participant alreadyPinnedParticipant = null; + // Check for a participant already pinned to the same screen index. if (status.PinnedUserId > 0) { - var alreadyPinnedParticipant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); + alreadyPinnedParticipant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); // Make sure that the already pinned participant isn't the same ID as for this message. If true, clear the pinned fb. if (alreadyPinnedParticipant != null && alreadyPinnedParticipant.UserId != status.PinnedUserId) @@ -1373,12 +1375,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { participant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); - if (participant == null) + if (participant == null && alreadyPinnedParticipant == null) { Debug.Console(1, this, "no matching participant found by pinned_user_id: {0} or screen_index: {1}", status.PinnedUserId, status.ScreenIndex); return; } - else + else if (participant != null) { Debug.Console(2, this, "Unpinning {0} with id: {1} from screen index: {2}", participant.Name, participant.UserId, status.ScreenIndex); participant.IsPinnedFb = false;