The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/ee/app/livechat-enterprise/server/hooks/onLoadConfigApi.js

15 lines
499 B

import { callbacks } from '../../../../../app/callbacks';
import { getLivechatQueueInfo, getLivechatCustomFields } from '../lib/Helper';
callbacks.add('livechat.onLoadConfigApi', async (options = {}) => {
const { room } = options;
const queueInfo = await getLivechatQueueInfo(room);
const customFields = getLivechatCustomFields();
return {
...queueInfo && { queueInfo },
...customFields && { customFields },
...options,
};
}, callbacks.priority.MEDIUM, 'livechat-on-load-config-api');