From 4e9e801404f2a2f9760c65f640342ed1148f8516 Mon Sep 17 00:00:00 2001 From: mwfarb Date: Wed, 28 Aug 2024 11:43:51 -0400 Subject: [PATCH] fix(chat): disable chat message ui when user permissions are removed --- src/systems/ui/chat.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/systems/ui/chat.js b/src/systems/ui/chat.js index 34acc4c09..14f37fe4e 100644 --- a/src/systems/ui/chat.js +++ b/src/systems/ui/chat.js @@ -155,6 +155,10 @@ AFRAME.registerSystem('arena-chat-ui', { this.chatDot.innerText = '...'; this.chatBtn.appendChild(this.chatDot); + // TODO (mwfarb): make more granular by rendering when incoming message arrives + // use token permissions to render message ui + this.chatBtn.style.display = this.arena.isUsersPermitted() ? 'block' : 'none'; + this.usersBtn = document.createElement('div'); this.usersBtn.className = 'arena-button users-button'; this.usersBtn.setAttribute('title', 'User List');