From bf134819f996f84a8f2ec837fd33bca4c9bda03f Mon Sep 17 00:00:00 2001 From: encrypt Date: Thu, 26 Mar 2020 22:36:13 +0100 Subject: [PATCH] splitting tokens replaced by native parsing of urllib --- app/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/index.js b/app/index.js index 92e64e9..15737e9 100644 --- a/app/index.js +++ b/app/index.js @@ -376,8 +376,7 @@ class GlobalBindings { // Make sure we stay open if we're running as Matrix widget window.matrixWidget.setAlwaysOnScreen(true) - // Register all channels, recursively - + // Register all channels, recursively if(channelName.indexOf("/") != 0) { channelName = "/"+channelName; } @@ -913,11 +912,12 @@ window.onload = function () { } else { useJoinDialog = false } - if (queryParams.tokens) { - ui.connectDialog.tokens(queryParams.tokens.split(",")) - } if (queryParams.token) { - ui.connectDialog.tokens(queryParams.token.split(",")) + var tokens = queryParams.token + if (!Array.isArray(tokens)) { + tokens = [tokens] + } + ui.connectDialog.tokens(tokens) } if (queryParams.username) { ui.connectDialog.username(queryParams.username)