From 6f644481f397af070e2b91b69846e375caafdbda Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 7 Sep 2023 00:01:27 +0200 Subject: prepare for room watches --- client-web/source/protocol/mod.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client-web/source/protocol/mod.ts') diff --git a/client-web/source/protocol/mod.ts b/client-web/source/protocol/mod.ts index 71c2b93..a7e1f63 100644 --- a/client-web/source/protocol/mod.ts +++ b/client-web/source/protocol/mod.ts @@ -5,7 +5,7 @@ */ import { ClientboundPacket, RelayMessage, RelayMessageWrapper, ServerboundPacket } from "../../../common/packets.d.ts" import { log } from "../logger.ts" -import { crypto_encrypt, crypto_seeded_key, crypt_decrypt, crypt_hash } from "./crypto.ts" +import { crypto_encrypt, crypto_seeded_key, crypt_decrypt, crypto_hash } from "./crypto.ts" export class SignalingConnection { room!: string @@ -20,7 +20,7 @@ export class SignalingConnection { constructor() { } async connect(room: string): Promise { this.key = await crypto_seeded_key(room) - this.signaling_id = await crypt_hash(room) + this.signaling_id = await crypto_hash(room) log("ws", "connecting…") const ws_url = new URL(`${window.location.protocol.endsWith("s:") ? "wss" : "ws"}://${window.location.host}/signaling/${encodeURIComponent(this.signaling_id)}`) this.websocket = new WebSocket(ws_url) -- cgit v1.2.3-70-g09d2