Built motion from commit (unavailable).|2.3.3
[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 _0xa47b=['exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','remove','emit','hasOwnProperty'];(function(_0xf0bc07,_0x510ebf){var _0x1c50c2=function(_0x2e2bdf){while(--_0x2e2bdf){_0xf0bc07['push'](_0xf0bc07['shift']());}};_0x1c50c2(++_0x510ebf);}(_0xa47b,0x79));var _0xba47=function(_0x173797,_0x205260){_0x173797=_0x173797-0x0;var _0x59484a=_0xa47b[_0x173797];return _0x59484a;};'use strict';var EventEmitter=require(_0xba47('0x0'));var UserVoiceQueueRt=require(_0xba47('0x1'))['db'][_0xba47('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xba47('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xba47('0x4')};function emitEvent(_0x46491b){return function(_0x46c604,_0x2b2a15,_0x1f6cfc){UserVoiceQueueRtEvents['emit'](_0x46491b+':'+_0x46c604['id'],_0x46c604);UserVoiceQueueRtEvents[_0xba47('0x5')](_0x46491b,_0x46c604);_0x1f6cfc(null);};}for(var e in events){if(events[_0xba47('0x6')](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0xba47('0x7')]=UserVoiceQueueRtEvents;