Built motion from commit (unavailable).|2.5.1
[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 _0x0c77=['hasOwnProperty','hook','exports','../../mysqldb','VoiceQueue','setMaxListeners','save','emit'];(function(_0x409682,_0x370090){var _0x1ee901=function(_0xe93c56){while(--_0xe93c56){_0x409682['push'](_0x409682['shift']());}};_0x1ee901(++_0x370090);}(_0x0c77,0x15b));var _0x70c7=function(_0x33032e,_0x31411a){_0x33032e=_0x33032e-0x0;var _0x13316b=_0x0c77[_0x33032e];return _0x13316b;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0x70c7('0x0'))['db'][_0x70c7('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x70c7('0x2')](0x0);var events={'afterCreate':_0x70c7('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x24bb67){return function(_0x1815f3,_0x5e76f7,_0x131e58){VoiceQueueEvents[_0x70c7('0x4')](_0x24bb67+':'+_0x1815f3['id'],_0x1815f3);VoiceQueueEvents['emit'](_0x24bb67,_0x1815f3);_0x131e58(null);};}for(var e in events){if(events[_0x70c7('0x5')](e)){var event=events[e];VoiceQueue[_0x70c7('0x6')](e,emitEvent(event));}}module[_0x70c7('0x7')]=VoiceQueueEvents;