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 _0xf3c6=['events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x3181cc,_0x28447f){var _0x547a4a=function(_0x3ede80){while(--_0x3ede80){_0x3181cc['push'](_0x3181cc['shift']());}};_0x547a4a(++_0x28447f);}(_0xf3c6,0x15f));var _0x6f3c=function(_0x7381ec,_0x50ecd2){_0x7381ec=_0x7381ec-0x0;var _0x20f436=_0xf3c6[_0x7381ec];return _0x20f436;};'use strict';var EventEmitter=require(_0x6f3c('0x0'));var UserVoiceQueueRt=require(_0x6f3c('0x1'))['db'][_0x6f3c('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x6f3c('0x3')](0x0);var events={'afterCreate':_0x6f3c('0x4'),'afterUpdate':_0x6f3c('0x5'),'afterDestroy':_0x6f3c('0x6')};function emitEvent(_0xba2a3f){return function(_0x5ab135,_0x270eea,_0x1c375d){UserVoiceQueueRtEvents[_0x6f3c('0x7')](_0xba2a3f+':'+_0x5ab135['id'],_0x5ab135);UserVoiceQueueRtEvents[_0x6f3c('0x7')](_0xba2a3f,_0x5ab135);_0x1c375d(null);};}for(var e in events){if(events[_0x6f3c('0x8')](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;