From 7d750db1f8235c8231699c2da39c1075ac678841 Mon Sep 17 00:00:00 2001 From: retoor Date: Sun, 2 Feb 2025 23:21:43 +0100 Subject: [PATCH] Fixed own notification issue. --- src/snek/static/app.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/snek/static/app.js b/src/snek/static/app.js index 46df3df..52c25a4 100644 --- a/src/snek/static/app.js +++ b/src/snek/static/app.js @@ -298,7 +298,6 @@ class NotificationAudio { } class App extends EventHandler { - rooms = [] rest = rest ws = null rpc = null @@ -306,7 +305,6 @@ class App extends EventHandler { user = {} constructor() { super() - this.rooms.push(new Room("General")) this.ws = new Socket() this.rpc = this.ws.client const me = this @@ -314,7 +312,10 @@ class App extends EventHandler { this.ws.addEventListener("channel-message", (data) => { me.emit(data.channel_uid, data) }) - this.user = await this.rpc.getUser(null) + + this.rpc.getUser(null).then(user=>{ + me.user = user + }) } playSound(index){ this.audio.play(index)