Built motion from commit 616d3211.|2.6.4
[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 _0x6da1=['UserVoiceQueueRt','save','update','remove','emit','events'];(function(_0x5df0f9,_0x38c14b){var _0x143b01=function(_0x124529){while(--_0x124529){_0x5df0f9['push'](_0x5df0f9['shift']());}};_0x143b01(++_0x38c14b);}(_0x6da1,0x12b));var _0x16da=function(_0x4c98b9,_0x1ad11b){_0x4c98b9=_0x4c98b9-0x0;var _0x3a257a=_0x6da1[_0x4c98b9];return _0x3a257a;};'use strict';var EventEmitter=require(_0x16da('0x0'));var UserVoiceQueueRt=require('../../mysqldb')['db'][_0x16da('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x16da('0x2'),'afterUpdate':_0x16da('0x3'),'afterDestroy':_0x16da('0x4')};function emitEvent(_0x57e2b4){return function(_0x19d168,_0x49c4a3,_0x11fbdc){UserVoiceQueueRtEvents[_0x16da('0x5')](_0x57e2b4+':'+_0x19d168['id'],_0x19d168);UserVoiceQueueRtEvents[_0x16da('0x5')](_0x57e2b4,_0x19d168);_0x11fbdc(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;