comply to lock settings for chat
This commit is contained in:
parent
6159fa1ed9
commit
e756ce1548
@ -105,15 +105,15 @@ const isChatLocked = (receiverID) => {
|
||||
const isPublic = receiverID === PUBLIC_CHAT_ID;
|
||||
|
||||
const meeting = Meetings.findOne({});
|
||||
const user = Users.findOne({});
|
||||
const user = Users.findOne({ userId: Auth.userID });
|
||||
|
||||
if (meeting.lockSettingsProp !== undefined) {
|
||||
const isPubChatLocked = meeting.lockSettingsProp.disablePubChat;
|
||||
const isPrivChatLocked = meeting.lockSettingsProp.disablePrivChat;
|
||||
const isViewer = user.role === 'VIEWER';
|
||||
|
||||
return (isPublic && isPubChatLocked && isViewer && user.locked)
|
||||
|| (!isPublic && isPrivChatLocked && isViewer && user.locked);
|
||||
return isViewer && user.locked &&
|
||||
((isPublic && isPubChatLocked) || (!isPublic && isPrivChatLocked));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user