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 _0x2edf=['events','../../mysqldb','UserVoiceQueueRt','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x43e9b8,_0x1a8aea){var _0x5c9781=function(_0x4b17e8){while(--_0x4b17e8){_0x43e9b8['push'](_0x43e9b8['shift']());}};_0x5c9781(++_0x1a8aea);}(_0x2edf,0x87));var _0xf2ed=function(_0x5d71fb,_0x5b3f42){_0x5d71fb=_0x5d71fb-0x0;var _0x19bac8=_0x2edf[_0x5d71fb];return _0x19bac8;};'use strict';var EventEmitter=require(_0xf2ed('0x0'));var UserVoiceQueueRt=require(_0xf2ed('0x1'))['db'][_0xf2ed('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf2ed('0x3'),'afterUpdate':_0xf2ed('0x4'),'afterDestroy':_0xf2ed('0x5')};function emitEvent(_0x30951e){return function(_0x16382c,_0xf49e72,_0x37e60e){UserVoiceQueueRtEvents[_0xf2ed('0x6')](_0x30951e+':'+_0x16382c['id'],_0x16382c);UserVoiceQueueRtEvents['emit'](_0x30951e,_0x16382c);_0x37e60e(null);};}for(var e in events){if(events[_0xf2ed('0x7')](e)){var event=events[e];UserVoiceQueueRt[_0xf2ed('0x8')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;