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 _0xc604=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','UserVoiceQueueRt'];(function(_0x1e172a,_0x52102b){var _0x96338b=function(_0x307313){while(--_0x307313){_0x1e172a['push'](_0x1e172a['shift']());}};_0x96338b(++_0x52102b);}(_0xc604,0xfa));var _0x4c60=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc604[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0x4c60('0x0'));var UserVoiceQueueRt=require(_0x4c60('0x1'))['db'][_0x4c60('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x4c60('0x3')](0x0);var events={'afterCreate':_0x4c60('0x4'),'afterUpdate':_0x4c60('0x5'),'afterDestroy':_0x4c60('0x6')};function emitEvent(_0x55e250){return function(_0x1f81ab,_0x35ab75,_0x58fd0a){UserVoiceQueueRtEvents[_0x4c60('0x7')](_0x55e250+':'+_0x1f81ab['id'],_0x1f81ab);UserVoiceQueueRtEvents[_0x4c60('0x7')](_0x55e250,_0x1f81ab);_0x58fd0a(null);};}for(var e in events){if(events[_0x4c60('0x8')](e)){var event=events[e];UserVoiceQueueRt[_0x4c60('0x9')](e,emitEvent(event));}}module[_0x4c60('0xa')]=UserVoiceQueueRtEvents;