mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
fix: added bool property tracking if meeting is require, added poll method and updated GetBookings to reference bool property that prohibits polling when meeting password is required
This commit is contained in:
@@ -66,6 +66,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)
|
||||||
{
|
{
|
||||||
@@ -79,13 +88,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);
|
||||||
@@ -1985,6 +1993,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");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2170,6 +2180,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}",
|
||||||
@@ -3390,6 +3401,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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user