mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
component/app: Automatically prepend wss to server URL if unspecified
This commit is contained in:
parent
f8060c9be2
commit
edbf294380
1 changed files with 3 additions and 0 deletions
|
@ -76,6 +76,9 @@ function fillConnectParams(params) {
|
||||||
if (params.url.startsWith("/")) {
|
if (params.url.startsWith("/")) {
|
||||||
params.url = proto + "//" + host + params.url;
|
params.url = proto + "//" + host + params.url;
|
||||||
}
|
}
|
||||||
|
if (params.url.indexOf("://") < 0) {
|
||||||
|
params.url = proto + "//" + params.url;
|
||||||
|
}
|
||||||
if (!params.username) {
|
if (!params.username) {
|
||||||
params.username = params.nick;
|
params.username = params.nick;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue