diff --git a/bigbluebutton-html5/imports/api/guest-users/server/methods/allowPendingUsers.js b/bigbluebutton-html5/imports/api/guest-users/server/methods/allowPendingUsers.js index d65a11a95e..8615f4a1fd 100644 --- a/bigbluebutton-html5/imports/api/guest-users/server/methods/allowPendingUsers.js +++ b/bigbluebutton-html5/imports/api/guest-users/server/methods/allowPendingUsers.js @@ -9,19 +9,23 @@ const CHANNEL = REDIS_CONFIG.channels.toAkkaApps; const EVENT_NAME = 'GuestsWaitingApprovedMsg'; export default function allowPendingUsers(guests, status) { - const { meetingId, requesterUserId } = extractCredentials(this.userId); + try { + const { meetingId, requesterUserId } = extractCredentials(this.userId); - check(meetingId, String); - check(requesterUserId, String); - check(guests, Array); - const mappedGuests = guests.map(guest => ({ status, guest: guest.intId })); + check(meetingId, String); + check(requesterUserId, String); + check(guests, Array); + const mappedGuests = guests.map((guest) => ({ status, guest: guest.intId })); - const payload = { - approvedBy: requesterUserId, - guests: mappedGuests, - }; + const payload = { + approvedBy: requesterUserId, + guests: mappedGuests, + }; - Logger.info(`User=${requesterUserId} ${status} guests ${JSON.stringify(mappedGuests)}`); + Logger.info(`User=${requesterUserId} ${status} guests ${JSON.stringify(mappedGuests)}`); - return RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, requesterUserId, payload); + RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, requesterUserId, payload); + } catch (err) { + Logger.error(`Exception while invoking method allowPendingUsers ${err.stack}`); + } } diff --git a/bigbluebutton-html5/imports/api/guest-users/server/methods/changeGuestPolicy.js b/bigbluebutton-html5/imports/api/guest-users/server/methods/changeGuestPolicy.js index 873b1a6eae..8774373130 100644 --- a/bigbluebutton-html5/imports/api/guest-users/server/methods/changeGuestPolicy.js +++ b/bigbluebutton-html5/imports/api/guest-users/server/methods/changeGuestPolicy.js @@ -9,18 +9,22 @@ const CHANNEL = REDIS_CONFIG.channels.toAkkaApps; const EVENT_NAME = 'SetGuestPolicyCmdMsg'; export default function changeGuestPolicy(policyRule) { - const { meetingId, requesterUserId } = extractCredentials(this.userId); + try { + const { meetingId, requesterUserId } = extractCredentials(this.userId); - check(meetingId, String); - check(requesterUserId, String); - check(policyRule, String); + check(meetingId, String); + check(requesterUserId, String); + check(policyRule, String); - const payload = { - setBy: requesterUserId, - policy: policyRule, - }; + const payload = { + setBy: requesterUserId, + policy: policyRule, + }; - Logger.info(`User=${requesterUserId} change guest policy to ${policyRule}`); + Logger.info(`User=${requesterUserId} change guest policy to ${policyRule}`); - return RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, requesterUserId, payload); + RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, requesterUserId, payload); + } catch (err) { + Logger.error(`Exception while invoking method changeGuestPolicy ${err.stack}`); + } } diff --git a/bigbluebutton-html5/imports/api/guest-users/server/methods/setGuestLobbyMessage.js b/bigbluebutton-html5/imports/api/guest-users/server/methods/setGuestLobbyMessage.js index 770ea41523..d3c8f6b0e6 100644 --- a/bigbluebutton-html5/imports/api/guest-users/server/methods/setGuestLobbyMessage.js +++ b/bigbluebutton-html5/imports/api/guest-users/server/methods/setGuestLobbyMessage.js @@ -9,16 +9,20 @@ const CHANNEL = REDIS_CONFIG.channels.toAkkaApps; const EVENT_NAME = 'SetGuestLobbyMessageCmdMsg'; export default function setGuestLobbyMessage(message) { - check(message, String); + try { + check(message, String); - const { meetingId, requesterUserId } = extractCredentials(this.userId); + const { meetingId, requesterUserId } = extractCredentials(this.userId); - check(meetingId, String); - check(requesterUserId, String); + check(meetingId, String); + check(requesterUserId, String); - const payload = { message }; + const payload = { message }; - Logger.info(`User=${requesterUserId} set guest lobby message to ${message}`); + Logger.info(`User=${requesterUserId} set guest lobby message to ${message}`); - return RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, requesterUserId, payload); + RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, requesterUserId, payload); + } catch (err) { + Logger.error(`Exception while invoking method setGuestLobbyMessage ${err.stack}`); + } }