Built motion from commit 0900f080.|2.5.45
[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 _0x27c7=['save','remove','emit','hook','UserVoiceQueueRt','setMaxListeners'];(function(_0x4c01b,_0x43a88b){var _0x2fa10a=function(_0x17b5c7){while(--_0x17b5c7){_0x4c01b['push'](_0x4c01b['shift']());}};_0x2fa10a(++_0x43a88b);}(_0x27c7,0x190));var _0x727c=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0x27c7[_0x6131cd];return _0x47e916;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require('../../mysqldb')['db'][_0x727c('0x0')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x727c('0x1')](0x0);var events={'afterCreate':_0x727c('0x2'),'afterUpdate':'update','afterDestroy':_0x727c('0x3')};function emitEvent(_0x7a6d37){return function(_0xdd84ea,_0x5e6886,_0x241540){UserVoiceQueueRtEvents[_0x727c('0x4')](_0x7a6d37+':'+_0xdd84ea['id'],_0xdd84ea);UserVoiceQueueRtEvents['emit'](_0x7a6d37,_0xdd84ea);_0x241540(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0x727c('0x5')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;