Built motion from commit (unavailable).|2.4.17
[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 _0x2e5a=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoiceQueue','setMaxListeners','remove'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x2e5a,0x100));var _0xa2e5=function(_0x368d62,_0x4b21bd){_0x368d62=_0x368d62-0x0;var _0x25188a=_0x2e5a[_0x368d62];return _0x25188a;};'use strict';var EventEmitter=require(_0xa2e5('0x0'));var VoiceQueue=require(_0xa2e5('0x1'))['db'][_0xa2e5('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xa2e5('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xa2e5('0x4')};function emitEvent(_0x1cbefc){return function(_0x6065f4,_0x23d5fe,_0x549c13){VoiceQueueEvents['emit'](_0x1cbefc+':'+_0x6065f4['id'],_0x6065f4);VoiceQueueEvents[_0xa2e5('0x5')](_0x1cbefc,_0x6065f4);_0x549c13(null);};}for(var e in events){if(events[_0xa2e5('0x6')](e)){var event=events[e];VoiceQueue[_0xa2e5('0x7')](e,emitEvent(event));}}module[_0xa2e5('0x8')]=VoiceQueueEvents;