From 760cafe02af1c04621ac986a85250feda9801843 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Thu, 10 Sep 2020 01:22:06 +0200 Subject: [PATCH] Display help message after receiving permissions from server. We used to display the help message too early, which caused us to display it even if the group doesn't exist or the user doesn't have the present permission. --- static/sfu.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/sfu.js b/static/sfu.js index 85e07e8..c050b9c 100644 --- a/static/sfu.js +++ b/static/sfu.js @@ -87,8 +87,6 @@ function setConnected(connected) { userbox.classList.remove('invisible'); connectionbox.classList.add('invisible'); displayUsername(); - displayMessage("Press Present to enable your camera or microphone", - "info"); } else { resetUsers(); let userpass = getUserPass(); @@ -770,6 +768,9 @@ function clearUsername() { function gotPermissions(perms) { displayUsername(); setButtonsVisibility(); + if(serverConnection.permissions.present) + displayMessage("Press Present to enable your camera or microphone", + "info"); } const urlRegexp = /https?:\/\/[-a-zA-Z0-9@:%/._\\+~#=?]+[-a-zA-Z0-9@:%/_\\+~#=]/g;