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 _0xf807=['hook','exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','update','remove','emit'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0xf807,0xac));var _0x7f80=function(_0x3ed203,_0x4e3a3c){_0x3ed203=_0x3ed203-0x0;var _0x558502=_0xf807[_0x3ed203];return _0x558502;};'use strict';var EventEmitter=require(_0x7f80('0x0'));var UserVoiceQueueRt=require(_0x7f80('0x1'))['db'][_0x7f80('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x7f80('0x3')](0x0);var events={'afterCreate':_0x7f80('0x4'),'afterUpdate':_0x7f80('0x5'),'afterDestroy':_0x7f80('0x6')};function emitEvent(_0x26b754){return function(_0x1ae7c8,_0x500e38,_0x4605c7){UserVoiceQueueRtEvents[_0x7f80('0x7')](_0x26b754+':'+_0x1ae7c8['id'],_0x1ae7c8);UserVoiceQueueRtEvents[_0x7f80('0x7')](_0x26b754,_0x1ae7c8);_0x4605c7(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0x7f80('0x8')](e,emitEvent(event));}}module[_0x7f80('0x9')]=UserVoiceQueueRtEvents;