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 _0x9ea3=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','update','remove'];(function(_0x4057fc,_0x35209c){var _0x1706a7=function(_0x46a7d9){while(--_0x46a7d9){_0x4057fc['push'](_0x4057fc['shift']());}};_0x1706a7(++_0x35209c);}(_0x9ea3,0x1dd));var _0x39ea=function(_0x2b9b7f,_0x4d47df){_0x2b9b7f=_0x2b9b7f-0x0;var _0x4ed19a=_0x9ea3[_0x2b9b7f];return _0x4ed19a;};'use strict';var EventEmitter=require(_0x39ea('0x0'));var UserVoiceQueueRt=require(_0x39ea('0x1'))['db'][_0x39ea('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x39ea('0x3')](0x0);var events={'afterCreate':_0x39ea('0x4'),'afterUpdate':_0x39ea('0x5'),'afterDestroy':_0x39ea('0x6')};function emitEvent(_0x5069fe){return function(_0x33de49,_0x42349a,_0x29bccf){UserVoiceQueueRtEvents[_0x39ea('0x7')](_0x5069fe+':'+_0x33de49['id'],_0x33de49);UserVoiceQueueRtEvents[_0x39ea('0x7')](_0x5069fe,_0x33de49);_0x29bccf(null);};}for(var e in events){if(events[_0x39ea('0x8')](e)){var event=events[e];UserVoiceQueueRt[_0x39ea('0x9')](e,emitEvent(event));}}module[_0x39ea('0xa')]=UserVoiceQueueRtEvents;