1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x2029=['setMaxListeners','emit','hook','exports','events','../../mysqldb'];(function(_0x422905,_0x3bce3a){var _0x33dc6c=function(_0x4852c9){while(--_0x4852c9){_0x422905['push'](_0x422905['shift']());}};_0x33dc6c(++_0x3bce3a);}(_0x2029,0x124));var _0x9202=function(_0x443f44,_0x387a15){_0x443f44=_0x443f44-0x0;var _0xe56a57=_0x2029[_0x443f44];return _0xe56a57;};'use strict';var EventEmitter=require(_0x9202('0x0'));var UserVoiceQueueRt=require(_0x9202('0x1'))['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x9202('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x87bf8d){return function(_0x2815d3,_0x21ea9d,_0x1c48b6){UserVoiceQueueRtEvents['emit'](_0x87bf8d+':'+_0x2815d3['id'],_0x2815d3);UserVoiceQueueRtEvents[_0x9202('0x3')](_0x87bf8d,_0x2815d3);_0x1c48b6(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0x9202('0x4')](e,emitEvent(event));}}module[_0x9202('0x5')]=UserVoiceQueueRtEvents;