Built motion from commit da617fac.|2.6.6
[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 _0xf470=['../../mysqldb','UserVoiceQueueRt','save','remove','emit','hasOwnProperty','hook','events'];(function(_0x5003bc,_0x18e9cc){var _0x57d786=function(_0x1ffd13){while(--_0x1ffd13){_0x5003bc['push'](_0x5003bc['shift']());}};_0x57d786(++_0x18e9cc);}(_0xf470,0x10f));var _0x0f47=function(_0x6cf19c,_0x2f3f02){_0x6cf19c=_0x6cf19c-0x0;var _0xce14f3=_0xf470[_0x6cf19c];return _0xce14f3;};'use strict';var EventEmitter=require(_0x0f47('0x0'));var UserVoiceQueueRt=require(_0x0f47('0x1'))['db'][_0x0f47('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x0f47('0x3'),'afterUpdate':'update','afterDestroy':_0x0f47('0x4')};function emitEvent(_0xc1a218){return function(_0x30a574,_0x45b203,_0x4dc9c9){UserVoiceQueueRtEvents[_0x0f47('0x5')](_0xc1a218+':'+_0x30a574['id'],_0x30a574);UserVoiceQueueRtEvents[_0x0f47('0x5')](_0xc1a218,_0x30a574);_0x4dc9c9(null);};}for(var e in events){if(events[_0x0f47('0x6')](e)){var event=events[e];UserVoiceQueueRt[_0x0f47('0x7')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;