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 _0xc50a=['remove','emit','hasOwnProperty','hook','events','VoiceQueue','save','update'];(function(_0xc4001c,_0x1bf8f0){var _0x49f7bc=function(_0x1059b8){while(--_0x1059b8){_0xc4001c['push'](_0xc4001c['shift']());}};_0x49f7bc(++_0x1bf8f0);}(_0xc50a,0x1e4));var _0xac50=function(_0x2c500c,_0x49e32b){_0x2c500c=_0x2c500c-0x0;var _0x24a508=_0xc50a[_0x2c500c];return _0x24a508;};'use strict';var EventEmitter=require(_0xac50('0x0'));var VoiceQueue=require('../../mysqldb')['db'][_0xac50('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xac50('0x2'),'afterUpdate':_0xac50('0x3'),'afterDestroy':_0xac50('0x4')};function emitEvent(_0x2bd7c5){return function(_0x167b84,_0x17391c,_0x23e994){VoiceQueueEvents['emit'](_0x2bd7c5+':'+_0x167b84['id'],_0x167b84);VoiceQueueEvents[_0xac50('0x5')](_0x2bd7c5,_0x167b84);_0x23e994(null);};}for(var e in events){if(events[_0xac50('0x6')](e)){var event=events[e];VoiceQueue[_0xac50('0x7')](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;