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 _0xc188=['UserVoiceQueueRt','setMaxListeners','update','remove','emit','hook','exports','events'];(function(_0x3c3de6,_0x22bfb9){var _0x5732cb=function(_0x3a8668){while(--_0x3a8668){_0x3c3de6['push'](_0x3c3de6['shift']());}};_0x5732cb(++_0x22bfb9);}(_0xc188,0x11f));var _0x8c18=function(_0x304d85,_0x3bd383){_0x304d85=_0x304d85-0x0;var _0x570077=_0xc188[_0x304d85];return _0x570077;};'use strict';var EventEmitter=require(_0x8c18('0x0'));var UserVoiceQueueRt=require('../../mysqldb')['db'][_0x8c18('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x8c18('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x8c18('0x3'),'afterDestroy':_0x8c18('0x4')};function emitEvent(_0x1bdaaf){return function(_0x312a7f,_0x9fc0d4,_0xe9f3d7){UserVoiceQueueRtEvents['emit'](_0x1bdaaf+':'+_0x312a7f['id'],_0x312a7f);UserVoiceQueueRtEvents[_0x8c18('0x5')](_0x1bdaaf,_0x312a7f);_0xe9f3d7(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0x8c18('0x6')](e,emitEvent(event));}}module[_0x8c18('0x7')]=UserVoiceQueueRtEvents;