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 _0x13c0=['hasOwnProperty','hook','events','../../mysqldb','VoiceQueue','setMaxListeners','emit'];(function(_0x3b10de,_0x3bb7e4){var _0x461407=function(_0x1279d4){while(--_0x1279d4){_0x3b10de['push'](_0x3b10de['shift']());}};_0x461407(++_0x3bb7e4);}(_0x13c0,0x79));var _0x013c=function(_0x16051a,_0x5e4326){_0x16051a=_0x16051a-0x0;var _0x35d20d=_0x13c0[_0x16051a];return _0x35d20d;};'use strict';var EventEmitter=require(_0x013c('0x0'));var VoiceQueue=require(_0x013c('0x1'))['db'][_0x013c('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x013c('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x17ae19){return function(_0x70a468,_0x22fb4b,_0x2c5853){VoiceQueueEvents[_0x013c('0x4')](_0x17ae19+':'+_0x70a468['id'],_0x70a468);VoiceQueueEvents[_0x013c('0x4')](_0x17ae19,_0x70a468);_0x2c5853(null);};}for(var e in events){if(events[_0x013c('0x5')](e)){var event=events[e];VoiceQueue[_0x013c('0x6')](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;