Built motion from commit (unavailable).|2.0.78
[motion2.git] / server / api / voiceQueue / voiceQueue.events.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xa870=['hasOwnProperty','hook','exports','events','setMaxListeners','save','update','emit'];(function(_0x55b234,_0x85ee4d){var _0x16e213=function(_0x1fbaef){while(--_0x1fbaef){_0x55b234['push'](_0x55b234['shift']());}};_0x16e213(++_0x85ee4d);}(_0xa870,0x143));var _0x0a87=function(_0x55db3b,_0x22c9a8){_0x55db3b=_0x55db3b-0x0;var _0x49eb46=_0xa870[_0x55db3b];return _0x49eb46;};'use strict';var EventEmitter=require(_0x0a87('0x0'));var VoiceQueue=require('../../mysqldb')['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x0a87('0x1')](0x0);var events={'afterCreate':_0x0a87('0x2'),'afterUpdate':_0x0a87('0x3'),'afterDestroy':'remove'};function emitEvent(_0x25d3c4){return function(_0x52740d,_0x46782a,_0x54e9a3){VoiceQueueEvents['emit'](_0x25d3c4+':'+_0x52740d['id'],_0x52740d);VoiceQueueEvents[_0x0a87('0x4')](_0x25d3c4,_0x52740d);_0x54e9a3(null);};}for(var e in events){if(events[_0x0a87('0x5')](e)){var event=events[e];VoiceQueue[_0x0a87('0x6')](e,emitEvent(event));}}module[_0x0a87('0x7')]=VoiceQueueEvents;