Built motion from commit (unavailable).|2.2.5
[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 _0xbd3a=['emit','hasOwnProperty','../../mysqldb','VoiceQueue','setMaxListeners','update','remove'];(function(_0x1a7d9f,_0x1aa836){var _0xb98d46=function(_0x5d9727){while(--_0x5d9727){_0x1a7d9f['push'](_0x1a7d9f['shift']());}};_0xb98d46(++_0x1aa836);}(_0xbd3a,0x1e5));var _0xabd3=function(_0x5a4832,_0x4e3d2b){_0x5a4832=_0x5a4832-0x0;var _0x5b316f=_0xbd3a[_0x5a4832];return _0x5b316f;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0xabd3('0x0'))['db'][_0xabd3('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xabd3('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xabd3('0x3'),'afterDestroy':_0xabd3('0x4')};function emitEvent(_0x407c3a){return function(_0x3ba6fa,_0x4552b7,_0x2ee490){VoiceQueueEvents[_0xabd3('0x5')](_0x407c3a+':'+_0x3ba6fa['id'],_0x3ba6fa);VoiceQueueEvents[_0xabd3('0x5')](_0x407c3a,_0x3ba6fa);_0x2ee490(null);};}for(var e in events){if(events[_0xabd3('0x6')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;