Built motion from commit (unavailable).|2.5.3
[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 _0xab54=['save','update','emit','hook','../../mysqldb','VoiceQueue','setMaxListeners'];(function(_0x46febb,_0x12162f){var _0x74382a=function(_0x19e7fa){while(--_0x19e7fa){_0x46febb['push'](_0x46febb['shift']());}};_0x74382a(++_0x12162f);}(_0xab54,0x115));var _0x4ab5=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xab54[_0x14add3];return _0x4a174f;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0x4ab5('0x0'))['db'][_0x4ab5('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x4ab5('0x2')](0x0);var events={'afterCreate':_0x4ab5('0x3'),'afterUpdate':_0x4ab5('0x4'),'afterDestroy':'remove'};function emitEvent(_0x121705){return function(_0x5724b6,_0x5c7f63,_0x534e2d){VoiceQueueEvents[_0x4ab5('0x5')](_0x121705+':'+_0x5724b6['id'],_0x5724b6);VoiceQueueEvents[_0x4ab5('0x5')](_0x121705,_0x5724b6);_0x534e2d(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue[_0x4ab5('0x6')](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;