[FIX] Omnichannel enabled setting not working when creating rooms (#24067)

* Fix omnichannel enabled setting not working when creating rooms

* Revert changes to translation file

* Apply suggestions from code review
pull/24069/head^2
Murtaza Patrawala 4 years ago committed by GitHub
parent 536816739c
commit 2df9fcce97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/livechat/server/lib/Livechat.js
  2. 1
      app/settings/server/CachedSettings.ts

@ -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;

@ -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
*/

Loading…
Cancel
Save