fix(rn,dialogs,auth) fix not showing authentication dialogs

1) Fix not being able to show multiple dialogs at once in iOS
2) Fix cancelling the login dialog when XMPP auth is enabled without
   guest support
This commit is contained in:
Saúl Ibarra Corretgé
2022-03-04 12:59:43 +01:00
committed by Saúl Ibarra Corretgé
parent 7522de033a
commit fca9a249dc
3 changed files with 53 additions and 12 deletions

View File

@@ -62,13 +62,14 @@ MiddlewareRegistry.register(store => next => action => {
// Go back to the app's entry point.
_hideLoginDialog(store);
const { authRequired, conference } = getState()['features/base/conference'];
const state = getState();
const { authRequired, conference } = state['features/base/conference'];
const { passwordRequired } = state['features/base/connection'];
// Only end the meeting if we are not already inside and trying to upgrade.
if (authRequired && !conference) {
// FIXME Like cancelWaitForOwner, dispatch conferenceLeft to notify
// the external-api.
// NOTE: Despite it's confusing name, `passwordRequired` implies an XMPP
// connection auth error.
if ((passwordRequired || authRequired) && !conference) {
dispatch(appNavigate(undefined));
}
}