component/app: Automatically prepend wss to server URL if unspecified

This commit is contained in:
delthas 2021-06-20 20:51:49 +02:00 committed by Simon Ser
parent f8060c9be2
commit edbf294380

View file

@ -76,6 +76,9 @@ function fillConnectParams(params) {
if (params.url.startsWith("/")) {
params.url = proto + "//" + host + params.url;
}
if (params.url.indexOf("://") < 0) {
params.url = proto + "//" + params.url;
}
if (!params.username) {
params.username = params.nick;
}