From daf8f79eb5aa486c5c10ecc99f4b757488b36da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sat, 7 Sep 2024 22:54:05 +0200 Subject: [PATCH] update client to include username when connecting to websocket. --- client/src/neko/base.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/neko/base.ts b/client/src/neko/base.ts index 43267b1d..6068fcd5 100644 --- a/client/src/neko/base.ts +++ b/client/src/neko/base.ts @@ -63,7 +63,9 @@ export abstract class BaseClient extends EventEmitter { this[EVENT.CONNECTING]() try { - this._ws = new WebSocket(`${url}?password=${encodeURIComponent(password)}`) + this._ws = new WebSocket( + `${url}?password=${encodeURIComponent(password)}&username=${encodeURIComponent(displayname)}`, + ) this.emit('debug', `connecting to ${this._ws.url}`) this._ws.onmessage = this.onMessage.bind(this) this._ws.onerror = () => this.onError.bind(this)