Built motion from commit b5996064.|2.6.21
[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 _0x2abb=['UserVoiceQueueRt','setMaxListeners','save','update','remove','emit','hook','exports','events','../../mysqldb'];(function(_0x4dd4e9,_0x3d4559){var _0x2f2fbd=function(_0x13f320){while(--_0x13f320){_0x4dd4e9['push'](_0x4dd4e9['shift']());}};_0x2f2fbd(++_0x3d4559);}(_0x2abb,0x18e));var _0xb2ab=function(_0x56324a,_0x495d0b){_0x56324a=_0x56324a-0x0;var _0x4700aa=_0x2abb[_0x56324a];return _0x4700aa;};'use strict';var EventEmitter=require(_0xb2ab('0x0'));var UserVoiceQueueRt=require(_0xb2ab('0x1'))['db'][_0xb2ab('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xb2ab('0x3')](0x0);var events={'afterCreate':_0xb2ab('0x4'),'afterUpdate':_0xb2ab('0x5'),'afterDestroy':_0xb2ab('0x6')};function emitEvent(_0x1e64ef){return function(_0x2a1a14,_0x5175d9,_0x188f5b){UserVoiceQueueRtEvents[_0xb2ab('0x7')](_0x1e64ef+':'+_0x2a1a14['id'],_0x2a1a14);UserVoiceQueueRtEvents[_0xb2ab('0x7')](_0x1e64ef,_0x2a1a14);_0x188f5b(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0xb2ab('0x8')](e,emitEvent(event));}}module[_0xb2ab('0x9')]=UserVoiceQueueRtEvents;