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 _0x514f=['hasOwnProperty','exports','UserVoiceQueueRt','setMaxListeners','update','remove','emit'];(function(_0x141564,_0x2d253b){var _0x45bf6b=function(_0x532676){while(--_0x532676){_0x141564['push'](_0x141564['shift']());}};_0x45bf6b(++_0x2d253b);}(_0x514f,0x10c));var _0xf514=function(_0x551f6e,_0x4b6328){_0x551f6e=_0x551f6e-0x0;var _0x422780=_0x514f[_0x551f6e];return _0x422780;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require('../../mysqldb')['db'][_0xf514('0x0')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xf514('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0xf514('0x2'),'afterDestroy':_0xf514('0x3')};function emitEvent(_0x785191){return function(_0x1b6a05,_0x12f0c1,_0x39b472){UserVoiceQueueRtEvents[_0xf514('0x4')](_0x785191+':'+_0x1b6a05['id'],_0x1b6a05);UserVoiceQueueRtEvents[_0xf514('0x4')](_0x785191,_0x1b6a05);_0x39b472(null);};}for(var e in events){if(events[_0xf514('0x5')](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0xf514('0x6')]=UserVoiceQueueRtEvents;