Built motion from commit 44b1f254.|2.6.26
[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 _0xe153=['update','remove','emit','hook','exports','../../mysqldb','UserVoiceQueueRt','save'];(function(_0x53ccf2,_0x13cb67){var _0x5a2964=function(_0x3b0514){while(--_0x3b0514){_0x53ccf2['push'](_0x53ccf2['shift']());}};_0x5a2964(++_0x13cb67);}(_0xe153,0x165));var _0x3e15=function(_0x1e4360,_0x930b9b){_0x1e4360=_0x1e4360-0x0;var _0x31e6b4=_0xe153[_0x1e4360];return _0x31e6b4;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0x3e15('0x0'))['db'][_0x3e15('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x3e15('0x2'),'afterUpdate':_0x3e15('0x3'),'afterDestroy':_0x3e15('0x4')};function emitEvent(_0x331f21){return function(_0x4a031e,_0x10f807,_0x23ce9e){UserVoiceQueueRtEvents[_0x3e15('0x5')](_0x331f21+':'+_0x4a031e['id'],_0x4a031e);UserVoiceQueueRtEvents['emit'](_0x331f21,_0x4a031e);_0x23ce9e(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0x3e15('0x6')](e,emitEvent(event));}}module[_0x3e15('0x7')]=UserVoiceQueueRtEvents;