Publish websocket endpoint in group status.

This commit is contained in:
Juliusz Chroboczek
2022-09-01 14:55:52 +02:00
parent 4e275a63b4
commit 4bc873a574
4 changed files with 24 additions and 8 deletions
+6 -1
View File
@@ -3431,7 +3431,12 @@ async function serverConnect() {
serverConnection.onusermessage = gotUserMessage;
serverConnection.onfiletransfer = gotFileTransfer;
let url = `ws${location.protocol === 'https:' ? 's' : ''}://${location.host}/ws`;
let url = groupStatus.endpoint;
if(!url) {
console.warn("no endpoint in status");
url = `ws${location.protocol === 'https:' ? 's' : ''}://${location.host}/ws`;
}
try {
await serverConnection.connect(url);
} catch(e) {