From 61dfa0b79f84c10cad8d5868c65dd689f1ecfbe6 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Wed, 5 May 2021 18:35:28 +0200 Subject: [PATCH] WIP. --- conversejs/builtin.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/conversejs/builtin.ts b/conversejs/builtin.ts index ee6e0eb1..df2a1ae5 100644 --- a/conversejs/builtin.ts +++ b/conversejs/builtin.ts @@ -133,6 +133,7 @@ window.initConverse = async function initConverse ({ // TODO: params.clear_messages_on_reconnection = true when muc_mam will be available. + let isAuthenticated: boolean = false if (authenticationUrl !== '') { const auth = await authenticatedMode(authenticationUrl) if (auth) { @@ -145,10 +146,18 @@ window.initConverse = async function initConverse ({ } else { params.muc_nickname_from_jid = true } + isAuthenticated = true // FIXME: use params.oauth_providers? } } + if (!isAuthenticated) { + console.log('User is not authenticated.') + // TODO: try to make these params work + // params.auto_register_muc_nickname = true + // params.muc_show_logs_before_join = true + } + if (!advancedControls) { // These params are for externals XMPP servers. // NB: because we dont know if external servers have authentication mecanism,