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 _0x7a10=['events','../../mysqldb','save','update','emit','hasOwnProperty','hook','exports'];(function(_0x344a3f,_0x579a22){var _0x264712=function(_0x34c9f0){while(--_0x34c9f0){_0x344a3f['push'](_0x344a3f['shift']());}};_0x264712(++_0x579a22);}(_0x7a10,0x68));var _0x07a1=function(_0x1ce9a7,_0x4c983c){_0x1ce9a7=_0x1ce9a7-0x0;var _0xf856a=_0x7a10[_0x1ce9a7];return _0xf856a;};'use strict';var EventEmitter=require(_0x07a1('0x0'));var UserVoiceQueueRt=require(_0x07a1('0x1'))['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x07a1('0x2'),'afterUpdate':_0x07a1('0x3'),'afterDestroy':'remove'};function emitEvent(_0x4df85c){return function(_0x3882c0,_0x21e84b,_0x453ac6){UserVoiceQueueRtEvents[_0x07a1('0x4')](_0x4df85c+':'+_0x3882c0['id'],_0x3882c0);UserVoiceQueueRtEvents['emit'](_0x4df85c,_0x3882c0);_0x453ac6(null);};}for(var e in events){if(events[_0x07a1('0x5')](e)){var event=events[e];UserVoiceQueueRt[_0x07a1('0x6')](e,emitEvent(event));}}module[_0x07a1('0x7')]=UserVoiceQueueRtEvents;