aboutsummaryrefslogtreecommitdiff
path: root/client-web/source/user
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-09-10 18:34:37 +0200
committermetamuffin <metamuffin@disroot.org>2022-09-10 18:34:37 +0200
commit0fe8df550d95926aca1607e6f9ef7ac8cb929adf (patch)
tree6a9b9da6f246d003688ab68ba1064fd779013063 /client-web/source/user
parentf268bd2087fbfb57b8504becf364a00ddebde075 (diff)
downloadkeks-meet-0fe8df550d95926aca1607e6f9ef7ac8cb929adf.tar
keks-meet-0fe8df550d95926aca1607e6f9ef7ac8cb929adf.tar.bz2
keks-meet-0fe8df550d95926aca1607e6f9ef7ac8cb929adf.tar.zst
notifications
Diffstat (limited to 'client-web/source/user')
-rw-r--r--client-web/source/user/remote.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/client-web/source/user/remote.ts b/client-web/source/user/remote.ts
index 2ddf2e6..5ac821c 100644
--- a/client-web/source/user/remote.ts
+++ b/client-web/source/user/remote.ts
@@ -1,8 +1,10 @@
/// <reference lib="dom" />
import { RelayMessage } from "../../../common/packets.d.ts";
+import { notify } from "../helper.ts";
import { ROOM_CONTAINER, RTC_CONFIG } from "../index.ts"
import { log } from "../logger.ts"
+import { PREFS } from "../preferences/mod.ts";
import { Room } from "../room.ts"
import { TrackHandle } from "../track_handle.ts";
import { User } from "./mod.ts"
@@ -40,6 +42,7 @@ export class RemoteUser extends User {
this.room.remote_users.delete(this.id)
super.leave()
ROOM_CONTAINER.removeChild(this.el)
+ if (PREFS.notify_leave) notify(`${this.display_name} left`)
}
on_relay(message: RelayMessage) {
@@ -47,7 +50,10 @@ export class RemoteUser extends User {
if (message.ice_candidate) this.add_ice_candidate(message.ice_candidate)
if (message.offer) this.on_offer(message.offer)
if (message.answer) this.on_answer(message.answer)
- if (message.identify) this.name = message.identify.username
+ if (message.identify) {
+ this.name = message.identify.username
+ if (PREFS.notify_join) notify(`${this.display_name} joined`)
+ }
}
async offer() {