Built motion from commit (unavailable).|2.5.24
[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 _0xfe11=['exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','update','emit','hook'];(function(_0x481844,_0x259b1f){var _0x2afc17=function(_0x3404d4){while(--_0x3404d4){_0x481844['push'](_0x481844['shift']());}};_0x2afc17(++_0x259b1f);}(_0xfe11,0x10f));var _0x1fe1=function(_0x9b9c46,_0x3997a8){_0x9b9c46=_0x9b9c46-0x0;var _0x47ee52=_0xfe11[_0x9b9c46];return _0x47ee52;};'use strict';var EventEmitter=require(_0x1fe1('0x0'));var UserVoiceQueueRt=require(_0x1fe1('0x1'))['db'][_0x1fe1('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x1fe1('0x3')](0x0);var events={'afterCreate':_0x1fe1('0x4'),'afterUpdate':_0x1fe1('0x5'),'afterDestroy':'remove'};function emitEvent(_0x33a857){return function(_0x1d8067,_0x3ff05d,_0x2d60f9){UserVoiceQueueRtEvents[_0x1fe1('0x6')](_0x33a857+':'+_0x1d8067['id'],_0x1d8067);UserVoiceQueueRtEvents[_0x1fe1('0x6')](_0x33a857,_0x1d8067);_0x2d60f9(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0x1fe1('0x7')](e,emitEvent(event));}}module[_0x1fe1('0x8')]=UserVoiceQueueRtEvents;