Built motion from commit (unavailable).|2.3.1
[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 _0x25b1=['emit','hook','events','../../mysqldb','UserVoiceQueueRt','save','update','remove'];(function(_0x50ec47,_0x6b2ba4){var _0x4274a1=function(_0x5e0909){while(--_0x5e0909){_0x50ec47['push'](_0x50ec47['shift']());}};_0x4274a1(++_0x6b2ba4);}(_0x25b1,0x1da));var _0x125b=function(_0x256057,_0x164e78){_0x256057=_0x256057-0x0;var _0xe7f4d3=_0x25b1[_0x256057];return _0xe7f4d3;};'use strict';var EventEmitter=require(_0x125b('0x0'));var UserVoiceQueueRt=require(_0x125b('0x1'))['db'][_0x125b('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x125b('0x3'),'afterUpdate':_0x125b('0x4'),'afterDestroy':_0x125b('0x5')};function emitEvent(_0x2307a6){return function(_0x250fc7,_0x216029,_0x2da6a1){UserVoiceQueueRtEvents['emit'](_0x2307a6+':'+_0x250fc7['id'],_0x250fc7);UserVoiceQueueRtEvents[_0x125b('0x6')](_0x2307a6,_0x250fc7);_0x2da6a1(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0x125b('0x7')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;