1b3ba3c459199b63e8f8ad711d804201f8c1009a
[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 _0x2fc3=['hasOwnProperty','hook','exports','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','remove','emit'];(function(_0x5a1a8e,_0x571ce1){var _0x32a713=function(_0xb3d753){while(--_0xb3d753){_0x5a1a8e['push'](_0x5a1a8e['shift']());}};_0x32a713(++_0x571ce1);}(_0x2fc3,0x135));var _0x32fc=function(_0x30a6ee,_0x285086){_0x30a6ee=_0x30a6ee-0x0;var _0x2aec1d=_0x2fc3[_0x30a6ee];return _0x2aec1d;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0x32fc('0x0'))['db'][_0x32fc('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x32fc('0x2')](0x0);var events={'afterCreate':_0x32fc('0x3'),'afterUpdate':'update','afterDestroy':_0x32fc('0x4')};function emitEvent(_0x3776dc){return function(_0x18fe19,_0x100bda,_0x359595){UserVoiceQueueRtEvents[_0x32fc('0x5')](_0x3776dc+':'+_0x18fe19['id'],_0x18fe19);UserVoiceQueueRtEvents['emit'](_0x3776dc,_0x18fe19);_0x359595(null);};}for(var e in events){if(events[_0x32fc('0x6')](e)){var event=events[e];UserVoiceQueueRt[_0x32fc('0x7')](e,emitEvent(event));}}module[_0x32fc('0x8')]=UserVoiceQueueRtEvents;