Merge pull request #20639 from ramonlsouza/issue-20569

fix: Layout VIDEO_FOCUS shows empty tiles for other participants when see other viewers is locked
This commit is contained in:
Ramón Souza 2024-07-05 17:25:20 -03:00 committed by GitHub
commit 9539ad09c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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 },