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 _0xcd5f=['update','remove','emit','hasOwnProperty','exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xcd5f,0x73));var _0xfcd5=function(_0x1b7f33,_0x290215){_0x1b7f33=_0x1b7f33-0x0;var _0x19a86f=_0xcd5f[_0x1b7f33];return _0x19a86f;};'use strict';var EventEmitter=require(_0xfcd5('0x0'));var UserVoiceQueueRt=require(_0xfcd5('0x1'))['db'][_0xfcd5('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xfcd5('0x3')](0x0);var events={'afterCreate':_0xfcd5('0x4'),'afterUpdate':_0xfcd5('0x5'),'afterDestroy':_0xfcd5('0x6')};function emitEvent(_0x54c220){return function(_0x383cbd,_0x41b347,_0x2cbba4){UserVoiceQueueRtEvents[_0xfcd5('0x7')](_0x54c220+':'+_0x383cbd['id'],_0x383cbd);UserVoiceQueueRtEvents[_0xfcd5('0x7')](_0x54c220,_0x383cbd);_0x2cbba4(null);};}for(var e in events){if(events[_0xfcd5('0x8')](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0xfcd5('0x9')]=UserVoiceQueueRtEvents;