serveur down, tentative de récup

This commit is contained in:
2024-01-02 15:13:55 +01:00
parent de3349e1c3
commit 862b655dab
11 changed files with 154 additions and 113 deletions

View File

@ -14,7 +14,7 @@ class Channel {
// reload = function to use when we receive a message
async connect(reload) {
let url = `ws://${window.location.host}/ws/chat/${this.channel_id}/`;
let url = `${window.location.protocol[4] === 's' ? 'wss' : 'ws'}://${window.location.host}/ws/chat/${this.channel_id}`;
this.chatSocket = new WebSocket(url);
this.chatSocket.onmessage = (event) =>{
@ -73,6 +73,10 @@ class Channel {
return data;
}
async sendInvite() {
}
}
export {Channel}