Merge branch 'development' into hotfix/xSigUpdateActiveCall-Fix

This commit is contained in:
Andrew Welker
2022-10-20 11:18:13 -06:00
committed by GitHub

View File

@@ -62,6 +62,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
private readonly ZoomRoomPropertiesConfig _props; private readonly ZoomRoomPropertiesConfig _props;
private bool _meetingPasswordRequired;
public void Poll(string pollString)
{
if(_meetingPasswordRequired) return;
SendText(string.Format("{0}{1}", pollString, SendDelimiter));
}
public ZoomRoom(DeviceConfig config, IBasicCommunication comm) public ZoomRoom(DeviceConfig config, IBasicCommunication comm)
: base(config) : base(config)
{ {
@@ -75,13 +84,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
if (_props.CommunicationMonitorProperties != null) if (_props.CommunicationMonitorProperties != null)
{ {
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, _props.CommunicationMonitorProperties.PollInterval, _props.CommunicationMonitorProperties.TimeToWarning, _props.CommunicationMonitorProperties.TimeToError,
_props.CommunicationMonitorProperties); () => Poll(_props.CommunicationMonitorProperties.PollString));
} }
else else
{ {
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000, CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000, () => Poll("zStatus SystemUnit"));
"zStatus SystemUnit" + SendDelimiter);
} }
DeviceManager.AddDevice(CommunicationMonitor); DeviceManager.AddDevice(CommunicationMonitor);
@@ -1992,6 +2000,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
/// </summary> /// </summary>
private void GetBookings() private void GetBookings()
{ {
if (_meetingPasswordRequired) return;
SendText("zCommand Bookings List"); SendText("zCommand Bookings List");
} }
@@ -2179,6 +2189,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
); );
} }
_meetingPasswordRequired = false;
base.OnCallStatusChange(item); base.OnCallStatusChange(item);
Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}", Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}",
@@ -3450,6 +3461,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
var handler = PasswordRequired; var handler = PasswordRequired;
if (handler != null) if (handler != null)
{ {
if(!loginFailed || !loginCancelled)
_meetingPasswordRequired = true;
handler(this, new PasswordPromptEventArgs(lastAttemptIncorrect, loginFailed, loginCancelled, message)); handler(this, new PasswordPromptEventArgs(lastAttemptIncorrect, loginFailed, loginCancelled, message));
} }
} }