diff --git a/bigbluebutton-html5/imports/api/audio/client/bridge/sip.js b/bigbluebutton-html5/imports/api/audio/client/bridge/sip.js index 47e6141377..ab7a8a188d 100644 --- a/bigbluebutton-html5/imports/api/audio/client/bridge/sip.js +++ b/bigbluebutton-html5/imports/api/audio/client/bridge/sip.js @@ -35,7 +35,8 @@ export default class SIPBridge extends BaseAudioBridge { } }; - // Checks periodically until a call is established so we can successfully end the call clean state + // Checks periodically until a call is established so we can successfully + // end the call clean state triedHangup = false; // function to initiate call diff --git a/bigbluebutton-html5/imports/api/audio/client/manager/index.js b/bigbluebutton-html5/imports/api/audio/client/manager/index.js index 9054a2e5e4..54f431f092 100644 --- a/bigbluebutton-html5/imports/api/audio/client/manager/index.js +++ b/bigbluebutton-html5/imports/api/audio/client/manager/index.js @@ -6,7 +6,10 @@ import SIPBridge from '../bridge/sip'; export default class AudioManager { constructor(userData) { const MEDIA_CONFIG = Meteor.settings.public.media; - const audioBridge = MEDIA_CONFIG.useSIPAudio ? new SIPBridge(userData) : new VertoBridge(userData); + const audioBridge = MEDIA_CONFIG.useSIPAudio + ? new SIPBridge(userData) + : new VertoBridge(userData); + if (!(audioBridge instanceof BaseAudioBridge)) { throw 'Audio Bridge not compatible'; } diff --git a/bigbluebutton-html5/imports/api/captions/server/handlers/captionUpdate.js b/bigbluebutton-html5/imports/api/captions/server/handlers/captionUpdate.js index a655575264..eb7a4859ef 100644 --- a/bigbluebutton-html5/imports/api/captions/server/handlers/captionUpdate.js +++ b/bigbluebutton-html5/imports/api/captions/server/handlers/captionUpdate.js @@ -136,7 +136,9 @@ export default function handleCaptionUpdate({ payload }) { //every other object, so that Captions collection could be updated in a proper order let tempObj = objectsToUpdate.splice(i, 1); let extraString = tempObj[0].captionHistory.captions.slice(CAPTION_CHUNK_LENGTH); - tempObj[0].captionHistory.captions = tempObj[0].captionHistory.captions.slice(0, CAPTION_CHUNK_LENGTH); + + tempObj[0].captionHistory.captions = + tempObj[0].captionHistory.captions.slice(0, CAPTION_CHUNK_LENGTH); maxIndex += 1; let tempIndex = tempObj[0].captionHistory.next; diff --git a/bigbluebutton-html5/imports/api/chat/server/modifiers/clearUserSystemMessages.js b/bigbluebutton-html5/imports/api/chat/server/modifiers/clearUserSystemMessages.js old mode 100755 new mode 100644 index 28360789ac..e6adcec64e --- a/bigbluebutton-html5/imports/api/chat/server/modifiers/clearUserSystemMessages.js +++ b/bigbluebutton-html5/imports/api/chat/server/modifiers/clearUserSystemMessages.js @@ -5,9 +5,9 @@ import { BREAK_LINE } from '/imports/utils/lineEndings.js'; /** * Remove any system message from the user with userId. - * + * * @param {string} meetingId - * @param {string} userId + * @param {string} userId */ export default function clearUserSystemMessages(meetingId, userId) { @@ -18,9 +18,9 @@ export default function clearUserSystemMessages(meetingId, userId) { const selector = { meetingId, - "message.from_userid": CHAT_CONFIG.type_system, - "message.to_userid": userId, - } + 'message.from_userid': CHAT_CONFIG.type_system, + 'message.to_userid': userId, + }; return Chat.remove(selector, Logger.info(`Removing system messages from: (${userId})`)); }; diff --git a/bigbluebutton-html5/imports/api/chat/server/publishers.js b/bigbluebutton-html5/imports/api/chat/server/publishers.js old mode 100755 new mode 100644 index dc1ce40d34..8636789cf1 --- a/bigbluebutton-html5/imports/api/chat/server/publishers.js +++ b/bigbluebutton-html5/imports/api/chat/server/publishers.js @@ -4,7 +4,7 @@ import { check } from 'meteor/check'; import Logger from '/imports/startup/server/logger'; import { isAllowedTo } from '/imports/startup/server/userPermissions'; -Meteor.publish('chat', function(credentials) { +Meteor.publish('chat', function (credentials) { if (!isAllowedTo('subscribeChat', credentials)) { this.error(new Meteor.Error(402, "The user was not authorized to subscribe for 'chats'")); } diff --git a/bigbluebutton-html5/imports/api/deskshare/client/bridge/service.js b/bigbluebutton-html5/imports/api/deskshare/client/bridge/service.js index ba3a058504..cd087cfd88 100644 --- a/bigbluebutton-html5/imports/api/deskshare/client/bridge/service.js +++ b/bigbluebutton-html5/imports/api/deskshare/client/bridge/service.js @@ -3,9 +3,8 @@ import Meetings from '/imports/api/meetings'; const getConferenceBridge = () => { const Meeting = Meetings.findOne(); return Meeting.voiceConf; -} +}; export { getConferenceBridge, -} - +}; diff --git a/bigbluebutton-html5/imports/api/polls/server/publishers.js b/bigbluebutton-html5/imports/api/polls/server/publishers.js old mode 100755 new mode 100644 index cc7568dab7..27098f6ca8 --- a/bigbluebutton-html5/imports/api/polls/server/publishers.js +++ b/bigbluebutton-html5/imports/api/polls/server/publishers.js @@ -4,7 +4,7 @@ import Polls from '/imports/api/polls'; import { check } from 'meteor/check'; import { logger } from '/imports/startup/server/logger'; -Meteor.publish('polls', function(credentials) { +Meteor.publish('polls', function (credentials) { //checking if it is allowed to see Poll Collection in general if (!isAllowedTo('subscribePoll', credentials)) { this.error(new Meteor.Error(402, "The user was not authorized to subscribe for 'polls'")); diff --git a/bigbluebutton-html5/imports/api/users/server/handlers/emojiStatus.js b/bigbluebutton-html5/imports/api/users/server/handlers/emojiStatus.js old mode 100644 new mode 100755 index 8596879304..f13c2d4645 --- a/bigbluebutton-html5/imports/api/users/server/handlers/emojiStatus.js +++ b/bigbluebutton-html5/imports/api/users/server/handlers/emojiStatus.js @@ -29,7 +29,9 @@ export default function handleEmojiStatus({ payload }) { } if (numChanged) { - return Logger.info(`Assigned user emoji status '${status}' id=${userId} meeting=${meetingId}`); + return Logger.info('Assigned user emoji status' + + status + ' id=' + userId + ' meeting=' + meetingId + ); } }; diff --git a/bigbluebutton-html5/imports/api/users/server/handlers/listeningOnly.js b/bigbluebutton-html5/imports/api/users/server/handlers/listeningOnly.js index 0bc55db33d..63fa0c82f7 100644 --- a/bigbluebutton-html5/imports/api/users/server/handlers/listeningOnly.js +++ b/bigbluebutton-html5/imports/api/users/server/handlers/listeningOnly.js @@ -28,7 +28,9 @@ export default function handleListeningOnly({ payload }) { } if (numChanged) { - return Logger.info(`Assigned listen only status '${listenOnly}' user=${userId} meeting=${meetingId}`); + return Logger.info( + `Assigned listen only status '${listenOnly}' user=${userId} meeting=${meetingId}` + ); } }; diff --git a/bigbluebutton-html5/imports/api/users/server/handlers/lockedStatusChange.js b/bigbluebutton-html5/imports/api/users/server/handlers/lockedStatusChange.js index 045a9ec259..f439a9eb1a 100755 --- a/bigbluebutton-html5/imports/api/users/server/handlers/lockedStatusChange.js +++ b/bigbluebutton-html5/imports/api/users/server/handlers/lockedStatusChange.js @@ -50,7 +50,8 @@ export default function handleLockedStatusChange({ payload }) { muteToggle(credentials, userId, true); } - return Logger.info(`Assigned locked status '${isLocked ? 'locked' : 'unlocked'}' id=${userId} meeting=${meetingId}`); + return Logger.info(`Assigned locked status '${isLocked + ? 'locked' : 'unlocked'}' id=${userId} meeting=${meetingId}`); } }; diff --git a/bigbluebutton-html5/imports/api/users/server/handlers/validateAuthToken.js b/bigbluebutton-html5/imports/api/users/server/handlers/validateAuthToken.js old mode 100644 new mode 100755 index b1fdda6ace..b5ae1279ff --- a/bigbluebutton-html5/imports/api/users/server/handlers/validateAuthToken.js +++ b/bigbluebutton-html5/imports/api/users/server/handlers/validateAuthToken.js @@ -45,7 +45,9 @@ export default function handleValidateAuthToken({ payload }) { addWelcomeChatMessage(meetingId, userId); } - return Logger.info(`Validated auth token as '${validStatus}' user=${userId} meeting=${meetingId}`); + return Logger.info('Validated auth token as ' + validStatus + + +' user=' + userId + ' meeting=' + meetingId + ); } }; diff --git a/bigbluebutton-html5/imports/api/users/server/methods/assignPresenter.js b/bigbluebutton-html5/imports/api/users/server/methods/assignPresenter.js index 3f873ee646..4d6f2ff2a5 100755 --- a/bigbluebutton-html5/imports/api/users/server/methods/assignPresenter.js +++ b/bigbluebutton-html5/imports/api/users/server/methods/assignPresenter.js @@ -36,7 +36,8 @@ export default function assignPresenter(credentials, userId) { assigned_by: requesterUserId, }; - Logger.verbose(`User '${userId}' setted as presenter by '${requesterUserId}' from meeting '${meetingId}'`); + Logger.verbose(`User '${userId}' setted as presenterby '${ + requesterUserId}' from meeting '${meetingId}'`); return RedisPubSub.publish(CHANNEL, EVENT_NAME, payload); }; diff --git a/bigbluebutton-html5/imports/api/users/server/methods/listenOnlyToggle.js b/bigbluebutton-html5/imports/api/users/server/methods/listenOnlyToggle.js old mode 100644 new mode 100755 index 3bd3efcfa5..2fbe1d0f76 --- a/bigbluebutton-html5/imports/api/users/server/methods/listenOnlyToggle.js +++ b/bigbluebutton-html5/imports/api/users/server/methods/listenOnlyToggle.js @@ -57,7 +57,8 @@ export default function listenOnlyToggle(credentials, isJoining = true) { name: User.user.name, }; - Logger.verbose(`User '${requesterUserId}' ${isJoining ? 'joined' : 'left'} global audio from meeting '${meetingId}'`); + Logger.verbose(`User '${requesterUserId}' ${isJoining + ? 'joined' : 'left'} global audio from meeting '${meetingId}'`); return RedisPubSub.publish(CHANNEL, EVENT_NAME, payload); }; diff --git a/bigbluebutton-html5/imports/api/users/server/methods/muteToggle.js b/bigbluebutton-html5/imports/api/users/server/methods/muteToggle.js index 03b3a1860c..2ca6d69141 100755 --- a/bigbluebutton-html5/imports/api/users/server/methods/muteToggle.js +++ b/bigbluebutton-html5/imports/api/users/server/methods/muteToggle.js @@ -32,7 +32,8 @@ export default function muteToggle(credentials, userId, isMuted = true) { requester_id: requesterUserId, }; - Logger.verbose(`User '${userId}' was ${!isMuted ? 'un' : ''}muted by '${requesterUserId}' from meeting '${meetingId}'`); + Logger.verbose(`User '${userId}' was ${!isMuted ? 'un' : ''}muted by '${ + requesterUserId}' from meeting '${meetingId}'`); return RedisPubSub.publish(CHANNEL, EVENT_NAME, payload); }; diff --git a/bigbluebutton-html5/imports/api/users/server/methods/setEmojiStatus.js b/bigbluebutton-html5/imports/api/users/server/methods/setEmojiStatus.js index 7bbb8e6516..f30f5a796b 100755 --- a/bigbluebutton-html5/imports/api/users/server/methods/setEmojiStatus.js +++ b/bigbluebutton-html5/imports/api/users/server/methods/setEmojiStatus.js @@ -25,7 +25,8 @@ export default function setEmojiStatus(credentials, userId, status) { meeting_id: meetingId, }; - Logger.verbose(`User '${userId}' emoji status updated to '${status}' by '${requesterUserId}' from meeting '${meetingId}'`); + Logger.verbose(`User '${userId}' emoji status updated to '${status}' by '${ + requesterUserId}' from meeting '${meetingId}'`); return RedisPubSub.publish(CHANNEL, EVENT_NAME, payload); }; diff --git a/bigbluebutton-html5/imports/api/users/server/methods/validateAuthToken.js b/bigbluebutton-html5/imports/api/users/server/methods/validateAuthToken.js index f16b80bb51..b8ac498d7c 100755 --- a/bigbluebutton-html5/imports/api/users/server/methods/validateAuthToken.js +++ b/bigbluebutton-html5/imports/api/users/server/methods/validateAuthToken.js @@ -42,7 +42,9 @@ export default function validateAuthToken(credentials) { reply_to: `${meetingId}/${requesterUserId}`, }; - Logger.info(`User '${requesterUserId}' is trying to validate auth token for meeting '${meetingId}'`); + Logger.info(`User '${ + requesterUserId + }' is trying to validate auth tokenfor meeting '${meetingId}'`); return RedisPubSub.publish(CHANNEL, EVENT_NAME, payload, header); }; diff --git a/bigbluebutton-html5/imports/api/users/server/modifiers/addUser.js b/bigbluebutton-html5/imports/api/users/server/modifiers/addUser.js index 9318053943..0b58b873b5 100644 --- a/bigbluebutton-html5/imports/api/users/server/modifiers/addUser.js +++ b/bigbluebutton-html5/imports/api/users/server/modifiers/addUser.js @@ -29,7 +29,7 @@ export default function addUser(meetingId, user) { dummyUser.clientType === 'HTML5' && user.role === ROLE_MODERATOR && !ALLOW_HTML5_MODERATOR) { - user.role = ROLE_VIEWER; + user.role = ROLE_VIEWER; } const modifier = { diff --git a/bigbluebutton-html5/imports/api/users/server/modifiers/setConnectionStatus.js b/bigbluebutton-html5/imports/api/users/server/modifiers/setConnectionStatus.js old mode 100644 new mode 100755 index 92770a166d..36a4206c45 --- a/bigbluebutton-html5/imports/api/users/server/modifiers/setConnectionStatus.js +++ b/bigbluebutton-html5/imports/api/users/server/modifiers/setConnectionStatus.js @@ -32,7 +32,8 @@ export default function setConnectionStatus(meetingId, userId, status = 'online' } if (numChanged) { - return Logger.info(`Updated connection status user=${userId} status=${status} meeting=${meetingId}`); + return Logger.info(`Updated connection status user=${userId} status=${ + status} meeting=${meetingId}`); } }; diff --git a/bigbluebutton-html5/imports/startup/client/auth.js b/bigbluebutton-html5/imports/startup/client/auth.js old mode 100644 new mode 100755 index 482db46390..5f09e2d164 --- a/bigbluebutton-html5/imports/startup/client/auth.js +++ b/bigbluebutton-html5/imports/startup/client/auth.js @@ -46,7 +46,11 @@ export function authenticatedRouteHandler(nextState, replace, callback) { Auth.authenticate() .then(callback) .catch(reason => { - logClient('error', { error: reason, method: 'authenticatedRouteHandler', credentialsSnapshot }); + logClient('error', { + error: reason, + method: 'authenticatedRouteHandler', + credentialsSnapshot, + }); // make sure users who did not connect are not added to the meeting // do **not** use the custom call - it relies on expired data @@ -77,8 +81,8 @@ function _addReconnectObservable() { /** * Check if should revalidate the auth - * @param {Object} status - * @param {String} lastStatus + * @param {Object} status + * @param {String} lastStatus */ export function shouldAuthenticate(status, lastStatus) { return lastStatus != null && lastStatus === STATUS_CONNECTING && status.connected; @@ -86,8 +90,8 @@ export function shouldAuthenticate(status, lastStatus) { /** * Check if the isn't the first connection try, preventing to authenticate on login. - * @param {Object} status - * @param {string} lastStatus + * @param {Object} status + * @param {string} lastStatus */ export function updateStatus(status, lastStatus) { return status.retryCount > 0 && lastStatus !== STATUS_CONNECTING ? status.status : lastStatus; diff --git a/bigbluebutton-html5/imports/startup/client/intl.js b/bigbluebutton-html5/imports/startup/client/intl.js index 6b14147766..1c7ddaa030 100644 --- a/bigbluebutton-html5/imports/startup/client/intl.js +++ b/bigbluebutton-html5/imports/startup/client/intl.js @@ -15,9 +15,9 @@ class IntlStartup extends Component { this.state = { messages: {}, - appLocale : this.props.locale, + appLocale: this.props.locale, }; - + this.fetchLocalizedMessages = this.fetchLocalizedMessages.bind(this); } @@ -32,7 +32,7 @@ class IntlStartup extends Component { if (response.ok) { return response.json(); } else { - this.setState({appLocale: 'en'}); + this.setState({ appLocale: 'en' }); return response.json(); } }) @@ -53,7 +53,7 @@ class IntlStartup extends Component { componentWillUpdate(nextProps, nextState) { if (this.props.locale !== nextProps.locale) { - this.setState({appLocale: nextProps.locale}); + this.setState({ appLocale: nextProps.locale }); this.fetchLocalizedMessages(nextProps.locale); } } diff --git a/bigbluebutton-html5/imports/startup/server/userPermissions.js b/bigbluebutton-html5/imports/startup/server/userPermissions.js index 750e536580..d1e15611b5 100755 --- a/bigbluebutton-html5/imports/startup/server/userPermissions.js +++ b/bigbluebutton-html5/imports/startup/server/userPermissions.js @@ -128,17 +128,14 @@ export function isAllowedTo(action, credentials) { userId, }); - const allowedToInitiateRequest = - user && + const allowedToInitiateRequest = user && user.authToken === authToken && user.validated && user.clientType === 'HTML5' && user.user && user.user.connection_status === 'online'; - const listOfSafeActions = [ - 'logoutSelf', - ]; + const listOfSafeActions = ['logoutSelf']; const requestIsSafe = listOfSafeActions.includes(action); @@ -151,10 +148,10 @@ export function isAllowedTo(action, credentials) { let result = false; // check role specific actions - if ('MODERATOR' === user.user.role) { + if (user.user.role === 'MODERATOR') { logger.debug('user permissions moderator case'); result = result || moderator[action]; - } else if ('VIEWER' === user.user.role) { + } else if (user.user.role === 'VIEWER') { logger.debug('user permissions viewer case'); result = result || viewer(meetingId, userId)[action]; } diff --git a/bigbluebutton-html5/imports/ui/components/about/container.jsx b/bigbluebutton-html5/imports/ui/components/about/container.jsx index 5a59189203..a24f08c727 100644 --- a/bigbluebutton-html5/imports/ui/components/about/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/about/container.jsx @@ -17,13 +17,13 @@ class AboutContainer extends Component { } } -const getClientBuildInfo = () => { +const getClientBuildInfo = function () { return { clientBuild: Meteor.settings.public.app.html5ClientBuild, copyright: Meteor.settings.public.app.copyright, }; }; -export default createContainer(() => { +export default createContainer(function () { return getClientBuildInfo(); }, AboutContainer); diff --git a/bigbluebutton-html5/imports/ui/components/actions-bar/component.jsx b/bigbluebutton-html5/imports/ui/components/actions-bar/component.jsx old mode 100755 new mode 100644 index 02643917d2..7ca0f02ac6 --- a/bigbluebutton-html5/imports/ui/components/actions-bar/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/actions-bar/component.jsx @@ -16,7 +16,7 @@ export default class ActionsBar extends Component { return (