0ff6cc6ae16bb0dacac14c67f51cdddcca84070d
[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 _0x6558=['hasOwnProperty','hook','exports','../../mysqldb','UserVoiceQueueRt','save','update','remove','emit'];(function(_0x310ed1,_0xe07db7){var _0x1caed9=function(_0x44ccc1){while(--_0x44ccc1){_0x310ed1['push'](_0x310ed1['shift']());}};_0x1caed9(++_0xe07db7);}(_0x6558,0xed));var _0x8655=function(_0x3b96cf,_0x1592f2){_0x3b96cf=_0x3b96cf-0x0;var _0x2e315a=_0x6558[_0x3b96cf];return _0x2e315a;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0x8655('0x0'))['db'][_0x8655('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x8655('0x2'),'afterUpdate':_0x8655('0x3'),'afterDestroy':_0x8655('0x4')};function emitEvent(_0x15cfcf){return function(_0x22eb61,_0x59e344,_0x4c958c){UserVoiceQueueRtEvents[_0x8655('0x5')](_0x15cfcf+':'+_0x22eb61['id'],_0x22eb61);UserVoiceQueueRtEvents[_0x8655('0x5')](_0x15cfcf,_0x22eb61);_0x4c958c(null);};}for(var e in events){if(events[_0x8655('0x6')](e)){var event=events[e];UserVoiceQueueRt[_0x8655('0x7')](e,emitEvent(event));}}module[_0x8655('0x8')]=UserVoiceQueueRtEvents;