Built motion from commit (unavailable).|2.5.2
[motion2.git] / server / api / userVoiceQueueRt / userVoiceQueueRt.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 _0x2fee=['save','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners'];(function(_0x21a735,_0xa8f5a3){var _0xcfd1bb=function(_0x2414b7){while(--_0x2414b7){_0x21a735['push'](_0x21a735['shift']());}};_0xcfd1bb(++_0xa8f5a3);}(_0x2fee,0x7e));var _0xe2fe=function(_0x484ad6,_0x4efaee){_0x484ad6=_0x484ad6-0x0;var _0x4950d0=_0x2fee[_0x484ad6];return _0x4950d0;};'use strict';var EventEmitter=require(_0xe2fe('0x0'));var UserVoiceQueueRt=require(_0xe2fe('0x1'))['db'][_0xe2fe('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xe2fe('0x3')](0x0);var events={'afterCreate':_0xe2fe('0x4'),'afterUpdate':'update','afterDestroy':_0xe2fe('0x5')};function emitEvent(_0x1d8946){return function(_0x1afbd6,_0x3f9177,_0x25aace){UserVoiceQueueRtEvents[_0xe2fe('0x6')](_0x1d8946+':'+_0x1afbd6['id'],_0x1afbd6);UserVoiceQueueRtEvents['emit'](_0x1d8946,_0x1afbd6);_0x25aace(null);};}for(var e in events){if(events[_0xe2fe('0x7')](e)){var event=events[e];UserVoiceQueueRt[_0xe2fe('0x8')](e,emitEvent(event));}}module[_0xe2fe('0x9')]=UserVoiceQueueRtEvents;