summaryrefslogtreecommitdiff
path: root/client-web/source/user/remote.ts
diff options
context:
space:
mode:
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)