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 _0x6c89=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','UserVoiceQueueRt'];(function(_0x46bb73,_0x44f394){var _0x44f271=function(_0x2a96bc){while(--_0x2a96bc){_0x46bb73['push'](_0x46bb73['shift']());}};_0x44f271(++_0x44f394);}(_0x6c89,0x9d));var _0x96c8=function(_0x284d1e,_0xd537f){_0x284d1e=_0x284d1e-0x0;var _0xeff2db=_0x6c89[_0x284d1e];return _0xeff2db;};'use strict';var EventEmitter=require(_0x96c8('0x0'));var UserVoiceQueueRt=require(_0x96c8('0x1'))['db'][_0x96c8('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x96c8('0x3')](0x0);var events={'afterCreate':_0x96c8('0x4'),'afterUpdate':_0x96c8('0x5'),'afterDestroy':_0x96c8('0x6')};function emitEvent(_0x54f6d1){return function(_0x2b3993,_0x39059f,_0x36e1a4){UserVoiceQueueRtEvents[_0x96c8('0x7')](_0x54f6d1+':'+_0x2b3993['id'],_0x2b3993);UserVoiceQueueRtEvents[_0x96c8('0x7')](_0x54f6d1,_0x2b3993);_0x36e1a4(null);};}for(var e in events){if(events[_0x96c8('0x8')](e)){var event=events[e];UserVoiceQueueRt[_0x96c8('0x9')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;