From d1338139d020786188d1f035f1f3befe71ae90ad Mon Sep 17 00:00:00 2001 From: Oswaldo Acauan Date: Thu, 23 Feb 2017 17:46:16 +0000 Subject: [PATCH] WIP. Refactor of get_users_reply handler --- .../.Trash-1000/files/setUserLockedStatus.js | 42 ------------------- .../info/setUserLockedStatus.js.trashinfo | 3 -- 2 files changed, 45 deletions(-) delete mode 100755 bigbluebutton-html5/.Trash-1000/files/setUserLockedStatus.js delete mode 100644 bigbluebutton-html5/.Trash-1000/info/setUserLockedStatus.js.trashinfo diff --git a/bigbluebutton-html5/.Trash-1000/files/setUserLockedStatus.js b/bigbluebutton-html5/.Trash-1000/files/setUserLockedStatus.js deleted file mode 100755 index 7167ab729c..0000000000 --- a/bigbluebutton-html5/.Trash-1000/files/setUserLockedStatus.js +++ /dev/null @@ -1,42 +0,0 @@ -import Users from '/imports/api/users'; -import { logger } from '/imports/startup/server/logger'; - -// change the locked status of a user (lock settings) -export function setUserLockedStatus(meetingId, userId, isLocked) { - let userObject; - userObject = Users.findOne({ - meetingId: meetingId, - userId: userId, - }); - if (userObject != null) { - Users.update({ - userId: userId, - meetingId: meetingId, - }, { - $set: { - 'user.locked': isLocked, - }, - }, (err, numChanged) => { - if (err != null) { - return logger.error(`_error ${err} while updating user ${userId} with lock settings`); - } else { - return logger.info( - `_setting user locked status for:[${userId}] ` + - `from [${meetingId}] locked=${isLocked}` - ); - } - }); - - // if the user is sharing audio, he should be muted upon locking involving disableMic - if (userObject.user.role === 'VIEWER' && !userObject.user.listenOnly && - userObject.user.voiceUser.joined && !userObject.user.voiceUser.muted && isLocked) { - // TODO why are we doing Meteor.call here?! Anton - // TODO: Uncomment this before PR - // return Meteor.call('muteUser', meetingId, userObject.userId, userObject.userId, - // userObject.authToken, true); //true for muted - } - } else { - let tempMsg = '(unsuccessful-no such user) setting user locked status for userid:'; - return logger.error(`${tempMsg}[${userId}] from [${meetingId}] locked=${isLocked}`); - } -}; diff --git a/bigbluebutton-html5/.Trash-1000/info/setUserLockedStatus.js.trashinfo b/bigbluebutton-html5/.Trash-1000/info/setUserLockedStatus.js.trashinfo deleted file mode 100644 index c205e1b6b0..0000000000 --- a/bigbluebutton-html5/.Trash-1000/info/setUserLockedStatus.js.trashinfo +++ /dev/null @@ -1,3 +0,0 @@ -[Trash Info] -Path=imports/api/users/server/modifiers/setUserLockedStatus.js -DeletionDate=2017-02-23T10:58:26