summaryrefslogtreecommitdiff
path: root/client-web/source/user/remote.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-01-27 19:59:39 +0100
committermetamuffin <metamuffin@disroot.org>2024-01-27 19:59:39 +0100
commit91259369b2b87eb647e9743c874d7e58894149c1 (patch)
treec717d3c4fb3322bb559a50eab1a2331f9c351a70 /client-web/source/user/remote.ts
parent0d8a3082fe32e9dd89deea9f051f6e53df591646 (diff)
downloadkeks-meet-91259369b2b87eb647e9743c874d7e58894149c1.tar
keks-meet-91259369b2b87eb647e9743c874d7e58894149c1.tar.bz2
keks-meet-91259369b2b87eb647e9743c874d7e58894149c1.tar.zst
handle room joins without page reload.
Diffstat (limited to 'client-web/source/user/remote.ts')
-rw-r--r--client-web/source/user/remote.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/client-web/source/user/remote.ts b/client-web/source/user/remote.ts
index 9964937..262efcd 100644
--- a/client-web/source/user/remote.ts
+++ b/client-web/source/user/remote.ts
@@ -6,7 +6,6 @@
/// <reference lib="dom" />
import { RelayMessage } from "../../../common/packets.d.ts";
-import { GLOBAL_CHAT } from "../chat.ts";
import { notify } from "../helper.ts";
import { log } from "../logger.ts"
import { PREFS } from "../preferences/mod.ts";
@@ -81,7 +80,7 @@ export class RemoteUser extends User {
this.room.remote_users.delete(this.id)
this.room.element.removeChild(this.el)
if (PREFS.notify_leave) notify(`${this.display_name} left`)
- GLOBAL_CHAT.add_control_message({ leave: this })
+ this.room.chat.add_control_message({ leave: this })
}
on_relay(message: RelayMessage) {
if (message.chat) this.room.chat.add_message(this, message.chat)
@@ -91,7 +90,7 @@ export class RemoteUser extends User {
if (message.identify) {
this.name = message.identify.username
if (PREFS.notify_join) notify(`${this.display_name} joined`)
- GLOBAL_CHAT.add_control_message({ join: this })
+ this.room.chat.add_control_message({ join: this })
}
if (message.provide) {
const d = new_remote_resource(this, message.provide)