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 _0xf60a=['setMaxListeners','update','remove','emit','hasOwnProperty','exports','events'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xf60a,0xae));var _0xaf60=function(_0x4fa72e,_0x336dda){_0x4fa72e=_0x4fa72e-0x0;var _0x28323a=_0xf60a[_0x4fa72e];return _0x28323a;};'use strict';var EventEmitter=require(_0xaf60('0x0'));var UserVoiceQueueRt=require('../../mysqldb')['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xaf60('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0xaf60('0x2'),'afterDestroy':_0xaf60('0x3')};function emitEvent(_0x1bab62){return function(_0x219413,_0x294ed3,_0x3a638f){UserVoiceQueueRtEvents[_0xaf60('0x4')](_0x1bab62+':'+_0x219413['id'],_0x219413);UserVoiceQueueRtEvents[_0xaf60('0x4')](_0x1bab62,_0x219413);_0x3a638f(null);};}for(var e in events){if(events[_0xaf60('0x5')](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0xaf60('0x6')]=UserVoiceQueueRtEvents;