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 _0x3a84=['update','remove','emit','hasOwnProperty','hook','events','../../mysqldb'];(function(_0x54b283,_0x5eb8a6){var _0x2462b3=function(_0x13fca7){while(--_0x13fca7){_0x54b283['push'](_0x54b283['shift']());}};_0x2462b3(++_0x5eb8a6);}(_0x3a84,0xb4));var _0x43a8=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3a84[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0x43a8('0x0'));var UserVoiceQueueRt=require(_0x43a8('0x1'))['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x43a8('0x2'),'afterDestroy':_0x43a8('0x3')};function emitEvent(_0x3b240f){return function(_0xa998c5,_0x47f0fd,_0x5ced71){UserVoiceQueueRtEvents[_0x43a8('0x4')](_0x3b240f+':'+_0xa998c5['id'],_0xa998c5);UserVoiceQueueRtEvents[_0x43a8('0x4')](_0x3b240f,_0xa998c5);_0x5ced71(null);};}for(var e in events){if(events[_0x43a8('0x5')](e)){var event=events[e];UserVoiceQueueRt[_0x43a8('0x6')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;