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 _0x91af=['hook','exports','../../mysqldb','setMaxListeners','save','update','remove','emit'];(function(_0xfb7226,_0x122207){var _0xdbb00f=function(_0x5e1a17){while(--_0x5e1a17){_0xfb7226['push'](_0xfb7226['shift']());}};_0xdbb00f(++_0x122207);}(_0x91af,0x19a));var _0xf91a=function(_0x19a92f,_0x45cde1){_0x19a92f=_0x19a92f-0x0;var _0x15d71b=_0x91af[_0x19a92f];return _0x15d71b;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0xf91a('0x0'))['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xf91a('0x1')](0x0);var events={'afterCreate':_0xf91a('0x2'),'afterUpdate':_0xf91a('0x3'),'afterDestroy':_0xf91a('0x4')};function emitEvent(_0x38dbf9){return function(_0x875574,_0x3dc574,_0x4a960d){UserVoiceQueueRtEvents[_0xf91a('0x5')](_0x38dbf9+':'+_0x875574['id'],_0x875574);UserVoiceQueueRtEvents[_0xf91a('0x5')](_0x38dbf9,_0x875574);_0x4a960d(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0xf91a('0x6')](e,emitEvent(event));}}module[_0xf91a('0x7')]=UserVoiceQueueRtEvents;