Built motion from commit (unavailable).|2.4.4
[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 _0xd331=['VoiceQueue','setMaxListeners','save','update','emit','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0x29a4b2,_0x10491c){var _0x4d78a3=function(_0x13ac67){while(--_0x13ac67){_0x29a4b2['push'](_0x29a4b2['shift']());}};_0x4d78a3(++_0x10491c);}(_0xd331,0xce));var _0x1d33=function(_0x340773,_0x1d64e6){_0x340773=_0x340773-0x0;var _0x5944fc=_0xd331[_0x340773];return _0x5944fc;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0x1d33('0x0'))['db'][_0x1d33('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x1d33('0x2')](0x0);var events={'afterCreate':_0x1d33('0x3'),'afterUpdate':_0x1d33('0x4'),'afterDestroy':'remove'};function emitEvent(_0x4c1093){return function(_0xd4c903,_0x5803d8,_0x1c9df1){VoiceQueueEvents[_0x1d33('0x5')](_0x4c1093+':'+_0xd4c903['id'],_0xd4c903);VoiceQueueEvents[_0x1d33('0x5')](_0x4c1093,_0xd4c903);_0x1c9df1(null);};}for(var e in events){if(events[_0x1d33('0x6')](e)){var event=events[e];VoiceQueue[_0x1d33('0x7')](e,emitEvent(event));}}module[_0x1d33('0x8')]=VoiceQueueEvents;