mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Adds condition to not check for already pinned participant if incoming message has user id < 0
This commit is contained in:
@@ -1348,15 +1348,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Debug.Console(1, this, "Pin Status notification for UserId: {0}, ScreenIndex: {1}", status.PinnedUserId, status.ScreenIndex);
|
Debug.Console(1, this, "Pin Status notification for UserId: {0}, ScreenIndex: {1}", status.PinnedUserId, status.ScreenIndex);
|
||||||
|
|
||||||
// Check for a participant already pinned to the same screen index.
|
// Check for a participant already pinned to the same screen index.
|
||||||
var alreadyPinnedParticipant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex));
|
if (status.PinnedUserId > 0)
|
||||||
|
|
||||||
// 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)
|
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Participant: {0} with id: {1} already pinned to screenIndex {2}. Clearing pinned fb.",
|
var alreadyPinnedParticipant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex));
|
||||||
alreadyPinnedParticipant.Name, alreadyPinnedParticipant.UserId, alreadyPinnedParticipant.ScreenIndexIsPinnedToFb);
|
|
||||||
alreadyPinnedParticipant.IsPinnedFb = false;
|
// Make sure that the already pinned participant isn't the same ID as for this message. If true, clear the pinned fb.
|
||||||
alreadyPinnedParticipant.ScreenIndexIsPinnedToFb = -1;
|
if (alreadyPinnedParticipant != null && alreadyPinnedParticipant.UserId != status.PinnedUserId)
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "Participant: {0} with id: {1} already pinned to screenIndex {2}. Clearing pinned fb.",
|
||||||
|
alreadyPinnedParticipant.Name, alreadyPinnedParticipant.UserId, alreadyPinnedParticipant.ScreenIndexIsPinnedToFb);
|
||||||
|
alreadyPinnedParticipant.IsPinnedFb = false;
|
||||||
|
alreadyPinnedParticipant.ScreenIndexIsPinnedToFb = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var participant = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(status.PinnedUserId));
|
var participant = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(status.PinnedUserId));
|
||||||
|
|||||||
Reference in New Issue
Block a user