ede96afd042d8e56331a3831bbad248d91c739b7
[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 _0xa0ca=['emit','hasOwnProperty','hook','../../mysqldb','UserVoiceQueueRt','save','update','remove'];(function(_0x2841ab,_0x192966){var _0x5611f8=function(_0x491b8c){while(--_0x491b8c){_0x2841ab['push'](_0x2841ab['shift']());}};_0x5611f8(++_0x192966);}(_0xa0ca,0x1ab));var _0xaa0c=function(_0x541851,_0x4914a5){_0x541851=_0x541851-0x0;var _0xb357c6=_0xa0ca[_0x541851];return _0xb357c6;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0xaa0c('0x0'))['db'][_0xaa0c('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xaa0c('0x2'),'afterUpdate':_0xaa0c('0x3'),'afterDestroy':_0xaa0c('0x4')};function emitEvent(_0x5b3dc7){return function(_0x53064e,_0x4327e1,_0x49fbc6){UserVoiceQueueRtEvents[_0xaa0c('0x5')](_0x5b3dc7+':'+_0x53064e['id'],_0x53064e);UserVoiceQueueRtEvents[_0xaa0c('0x5')](_0x5b3dc7,_0x53064e);_0x49fbc6(null);};}for(var e in events){if(events[_0xaa0c('0x6')](e)){var event=events[e];UserVoiceQueueRt[_0xaa0c('0x7')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;