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 _0x712e=['hasOwnProperty','hook','events','../../mysqldb','UserVoiceQueueRt','save','update','remove','emit'];(function(_0x1ce1d3,_0x507acf){var _0x1ca0a4=function(_0x5a0641){while(--_0x5a0641){_0x1ce1d3['push'](_0x1ce1d3['shift']());}};_0x1ca0a4(++_0x507acf);}(_0x712e,0x173));var _0xe712=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x712e[_0x321bb2];return _0x9c12ed;};'use strict';var EventEmitter=require(_0xe712('0x0'));var UserVoiceQueueRt=require(_0xe712('0x1'))['db'][_0xe712('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe712('0x3'),'afterUpdate':_0xe712('0x4'),'afterDestroy':_0xe712('0x5')};function emitEvent(_0x4a233a){return function(_0x58626b,_0x120a84,_0x2d9c14){UserVoiceQueueRtEvents[_0xe712('0x6')](_0x4a233a+':'+_0x58626b['id'],_0x58626b);UserVoiceQueueRtEvents[_0xe712('0x6')](_0x4a233a,_0x58626b);_0x2d9c14(null);};}for(var e in events){if(events[_0xe712('0x7')](e)){var event=events[e];UserVoiceQueueRt[_0xe712('0x8')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;