Built motion from commit 97153652.|2.6.26
[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 _0x73e0=['save','update','emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoiceQueue'];(function(_0x415f7e,_0x4630b6){var _0x311ff4=function(_0x19c19d){while(--_0x19c19d){_0x415f7e['push'](_0x415f7e['shift']());}};_0x311ff4(++_0x4630b6);}(_0x73e0,0x114));var _0x073e=function(_0x21d80c,_0x1bc9fa){_0x21d80c=_0x21d80c-0x0;var _0xc8c035=_0x73e0[_0x21d80c];return _0xc8c035;};'use strict';var EventEmitter=require(_0x073e('0x0'));var VoiceQueue=require(_0x073e('0x1'))['db'][_0x073e('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x073e('0x3'),'afterUpdate':_0x073e('0x4'),'afterDestroy':'remove'};function emitEvent(_0x3bc30c){return function(_0x12a16c,_0x1262ee,_0x556b20){VoiceQueueEvents[_0x073e('0x5')](_0x3bc30c+':'+_0x12a16c['id'],_0x12a16c);VoiceQueueEvents[_0x073e('0x5')](_0x3bc30c,_0x12a16c);_0x556b20(null);};}for(var e in events){if(events[_0x073e('0x6')](e)){var event=events[e];VoiceQueue[_0x073e('0x7')](e,emitEvent(event));}}module[_0x073e('0x8')]=VoiceQueueEvents;