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 _0xac61=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xac61,0x13a));var _0x1ac6=function(_0x4d7ba8,_0x4fa8c7){_0x4d7ba8=_0x4d7ba8-0x0;var _0x323c58=_0xac61[_0x4d7ba8];return _0x323c58;};'use strict';var EventEmitter=require(_0x1ac6('0x0'));var UserVoiceQueueRt=require(_0x1ac6('0x1'))['db'][_0x1ac6('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x1ac6('0x3')](0x0);var events={'afterCreate':_0x1ac6('0x4'),'afterUpdate':_0x1ac6('0x5'),'afterDestroy':_0x1ac6('0x6')};function emitEvent(_0x2f53ab){return function(_0x3ab369,_0x41e7fe,_0x4149dd){UserVoiceQueueRtEvents[_0x1ac6('0x7')](_0x2f53ab+':'+_0x3ab369['id'],_0x3ab369);UserVoiceQueueRtEvents[_0x1ac6('0x7')](_0x2f53ab,_0x3ab369);_0x4149dd(null);};}for(var e in events){if(events[_0x1ac6('0x8')](e)){var event=events[e];UserVoiceQueueRt[_0x1ac6('0x9')](e,emitEvent(event));}}module[_0x1ac6('0xa')]=UserVoiceQueueRtEvents;