From 92f1e7ba0451f286017bee0b23b19b8deaad349a Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Mon, 12 Jun 2023 18:16:27 -0700 Subject: [PATCH] Show user display name on join events --- web/static/js/BareRTC.js | 3 +++ web/templates/chat.html | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/web/static/js/BareRTC.js b/web/static/js/BareRTC.js index 3449975..8cc4722 100644 --- a/web/static/js/BareRTC.js +++ b/web/static/js/BareRTC.js @@ -872,6 +872,9 @@ const app = Vue.createApp({ } return ""; }, + isUsernameOnline(username) { + return this.whoMap[username] != undefined; + }, avatarForUsername(username) { if (this.whoMap[username] != undefined && this.whoMap[username].avatar) { return this.avatarURL(this.whoMap[username]); diff --git a/web/templates/chat.html b/web/templates/chat.html index b367714..69367fa 100644 --- a/web/templates/chat.html +++ b/web/templates/chat.html @@ -747,7 +747,9 @@
- [[ msg.username ]] [[msg.message]] + [[ nicknameForUsername(msg.username) ]] + (@[[msg.username]]) + [[msg.message]]