fix grid mode displaying viewers if see other viewers is locked

This commit is contained in:
Ramón Souza 2024-07-05 10:04:57 -03:00
parent b697667364
commit 91762178b9

View File

@ -454,8 +454,16 @@ class VideoService {
let users = []; let users = [];
if (isGridEnabled) { if (isGridEnabled) {
const selector = {
meetingId: Auth.meetingID,
};
if (this.hideUserlist() && this.getMyRole() === ROLE_VIEWER) {
selector.role = { $ne: ROLE_VIEWER };
}
users = Users.find( users = Users.find(
{ meetingId: Auth.meetingID }, selector,
{ fields: { loggedOut: 1, left: 1, ...neededDataTypes} }, { fields: { loggedOut: 1, left: 1, ...neededDataTypes} },
).fetch(); ).fetch();
} }
@ -633,6 +641,12 @@ class VideoService {
return false; return false;
} }
hideUserlist() {
const meeting = Meetings.findOne({ meetingId: Auth.meetingID },
{ fields: { 'lockSettingsProps.hideUserList': 1 } });
return meeting.lockSettingsProps ? meeting.lockSettingsProps.hideUserList : false;
}
hasCapReached() { hasCapReached() {
const meeting = Meetings.findOne( const meeting = Meetings.findOne(
{ meetingId: Auth.meetingID }, { meetingId: Auth.meetingID },