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 _0x0e35=['../../mysqldb','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x509195,_0x100287){var _0x195357=function(_0x33b2a8){while(--_0x33b2a8){_0x509195['push'](_0x509195['shift']());}};_0x195357(++_0x100287);}(_0x0e35,0x1e8));var _0x50e3=function(_0x2cc0a5,_0x10a20e){_0x2cc0a5=_0x2cc0a5-0x0;var _0x5aca1e=_0x0e35[_0x2cc0a5];return _0x5aca1e;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0x50e3('0x0'))['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x50e3('0x1'),'afterUpdate':_0x50e3('0x2'),'afterDestroy':_0x50e3('0x3')};function emitEvent(_0xe8feac){return function(_0x2e99cf,_0x4ac2ad,_0x5ad0c3){UserVoiceQueueRtEvents[_0x50e3('0x4')](_0xe8feac+':'+_0x2e99cf['id'],_0x2e99cf);UserVoiceQueueRtEvents[_0x50e3('0x4')](_0xe8feac,_0x2e99cf);_0x5ad0c3(null);};}for(var e in events){if(events[_0x50e3('0x5')](e)){var event=events[e];UserVoiceQueueRt[_0x50e3('0x6')](e,emitEvent(event));}}module[_0x50e3('0x7')]=UserVoiceQueueRtEvents;