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 _0x7a46=['events','UserVoiceQueueRt','update','remove','emit','hook','exports'];(function(_0xf2682d,_0x48f012){var _0x53dea0=function(_0x47235e){while(--_0x47235e){_0xf2682d['push'](_0xf2682d['shift']());}};_0x53dea0(++_0x48f012);}(_0x7a46,0x173));var _0x67a4=function(_0x5ab588,_0x419aba){_0x5ab588=_0x5ab588-0x0;var _0x539503=_0x7a46[_0x5ab588];return _0x539503;};'use strict';var EventEmitter=require(_0x67a4('0x0'));var UserVoiceQueueRt=require('../../mysqldb')['db'][_0x67a4('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x67a4('0x2'),'afterDestroy':_0x67a4('0x3')};function emitEvent(_0x41b2ae){return function(_0x164ec4,_0x5c1eb4,_0x3de0c8){UserVoiceQueueRtEvents['emit'](_0x41b2ae+':'+_0x164ec4['id'],_0x164ec4);UserVoiceQueueRtEvents[_0x67a4('0x4')](_0x41b2ae,_0x164ec4);_0x3de0c8(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0x67a4('0x5')](e,emitEvent(event));}}module[_0x67a4('0x6')]=UserVoiceQueueRtEvents;