From 91762178b90d16c306bd51ad5c40536255d9ec9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Souza?= Date: Fri, 5 Jul 2024 10:04:57 -0300 Subject: [PATCH] fix grid mode displaying viewers if see other viewers is locked --- .../ui/components/video-provider/service.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/ui/components/video-provider/service.js b/bigbluebutton-html5/imports/ui/components/video-provider/service.js index ff80d6adc1..7441381028 100755 --- a/bigbluebutton-html5/imports/ui/components/video-provider/service.js +++ b/bigbluebutton-html5/imports/ui/components/video-provider/service.js @@ -454,8 +454,16 @@ class VideoService { let users = []; if (isGridEnabled) { + const selector = { + meetingId: Auth.meetingID, + }; + + if (this.hideUserlist() && this.getMyRole() === ROLE_VIEWER) { + selector.role = { $ne: ROLE_VIEWER }; + } + users = Users.find( - { meetingId: Auth.meetingID }, + selector, { fields: { loggedOut: 1, left: 1, ...neededDataTypes} }, ).fetch(); } @@ -633,6 +641,12 @@ class VideoService { return false; } + hideUserlist() { + const meeting = Meetings.findOne({ meetingId: Auth.meetingID }, + { fields: { 'lockSettingsProps.hideUserList': 1 } }); + return meeting.lockSettingsProps ? meeting.lockSettingsProps.hideUserList : false; + } + hasCapReached() { const meeting = Meetings.findOne( { meetingId: Auth.meetingID },