diff --git a/app/livechat/server/lib/Livechat.js b/app/livechat/server/lib/Livechat.js index 8624924c210..f57127cd58f 100644 --- a/app/livechat/server/lib/Livechat.js +++ b/app/livechat/server/lib/Livechat.js @@ -156,6 +156,9 @@ export const Livechat = { }, async getRoom(guest, message, roomInfo, agent, extraData) { + if (!this.enabled()) { + throw new Meteor.Error('error-omnichannel-is-disabled'); + } Livechat.logger.debug(`Attempting to find or create a room for visitor ${guest._id}`); let room = LivechatRooms.findOneById(message.rid); let newRoom = false; diff --git a/app/settings/server/CachedSettings.ts b/app/settings/server/CachedSettings.ts index 538487cc3ed..814003dc4d6 100644 --- a/app/settings/server/CachedSettings.ts +++ b/app/settings/server/CachedSettings.ts @@ -220,6 +220,7 @@ export class CachedSettings * Gets the current value of the setting * @remarks * - In development mode if you are trying to get the value of a setting that is not defined, it will give an warning, in theory it makes sense, there no reason to do that + * - The setting's value will be cached in memory so it won't call the DB every time you fetch a particular setting * @param _id - The setting id * @returns {SettingValue} - The current value of the setting */