fix: added additional evaluations for prompt property tracking and set/reset to handled unknown user scenarios

This commit is contained in:
jdevito
2022-10-28 08:38:16 -05:00
parent 95627df1a6
commit 4d6da37c60

View File

@@ -2578,11 +2578,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
PasswordRequired += (devices, args) => PasswordRequired += (devices, args) =>
{ {
Debug.Console(0, this, "***********************************PaswordRequired. Message: {0} Cancelled: {1} Last Incorrect: {2} Failed: {3}", args.Message, args.LoginAttemptCancelled, args.LastAttemptWasIncorrect, args.LoginAttemptFailed); Debug.Console(2, this, "***********************************PaswordRequired. Message: {0} Cancelled: {1} Last Incorrect: {2} Failed: {3}", args.Message, args.LoginAttemptCancelled, args.LastAttemptWasIncorrect, args.LoginAttemptFailed);
if (args.LoginAttemptCancelled) if (args.LoginAttemptCancelled)
{ {
trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, false); trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, false);
_meetingPasswordRequired = false;
return; return;
} }
@@ -2594,6 +2595,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
if (args.LoginAttemptFailed) if (args.LoginAttemptFailed)
{ {
// login attempt failed // login attempt failed
_meetingPasswordRequired = false;
return; return;
} }
@@ -2818,16 +2820,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public void LeaveMeeting() public void LeaveMeeting()
{ {
SendText("zCommand Call Leave"); if (_meetingPasswordRequired) _meetingPasswordRequired = false;
if (_waitingForUserToAcceptOrRejectIncomingCall) _waitingForUserToAcceptOrRejectIncomingCall = false;
SendText("zCommand Call Leave");
} }
public override void EndCall(CodecActiveCallItem call) public override void EndCall(CodecActiveCallItem call)
{ {
if (_meetingPasswordRequired) _meetingPasswordRequired = false;
if (_waitingForUserToAcceptOrRejectIncomingCall) _waitingForUserToAcceptOrRejectIncomingCall = false;
SendText("zCommand Call Disconnect"); SendText("zCommand Call Disconnect");
} }
public override void EndAllCalls() public override void EndAllCalls()
{ {
if (_meetingPasswordRequired) _meetingPasswordRequired = false;
if (_waitingForUserToAcceptOrRejectIncomingCall) _waitingForUserToAcceptOrRejectIncomingCall = false;
SendText("zCommand Call Disconnect"); SendText("zCommand Call Disconnect");
} }
@@ -3487,10 +3498,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
var handler = PasswordRequired; var handler = PasswordRequired;
if (handler != null) if (handler != null)
{ {
if(!loginFailed || !loginCancelled) _meetingPasswordRequired = !loginFailed || !loginCancelled;
_meetingPasswordRequired = true; Debug.Console(2, this, "Meeting Password Required: {0}", _meetingPasswordRequired);
handler(this, new PasswordPromptEventArgs(lastAttemptIncorrect, loginFailed, loginCancelled, message)); handler(this, new PasswordPromptEventArgs(lastAttemptIncorrect, loginFailed, loginCancelled, message));
} }
} }