Skip to content
Snippets Groups Projects
Commit 89be9ef2 authored by Bobak Oftadeh's avatar Bobak Oftadeh
Browse files

Improved micsLocked implementation

parent 4649fe7c
No related branches found
No related tags found
No related merge requests found
......@@ -43,16 +43,11 @@ export default withModalMounter(withTracker(({ mountModal }) =>
glow: Service.isTalking() && !Service.isMuted(),
handleToggleMuteMicrophone: () => Service.toggleMuteMicrophone(),
handleJoinAudio: () => {
const meetingId = Auth.meetingID;
const meeting = Meetings.findOne({ meetingId });
const meeting = Meetings.findOne({ meetingId: Auth.meetingID });
const currentUser = Users.findOne({ userId: Auth.userID });
const micsLocked = (currentUser.role === 'VIEWER' && meeting.lockSettingsProp.disableMic);
if (!micsLocked) {
mountModal(<AudioModalContainer />);
} else {
Service.joinListenOnly();
}
return micsLocked ? Service.joinListenOnly() : mountModal(<AudioModalContainer />);
},
handleLeaveAudio: () => Service.exitAudio(),
}))(AudioControlsContainer));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment