8e20cba2dd2da0d8c4002bd97530adf3905887af
[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 _0xcfb8=['remove','emit','hasOwnProperty','exports','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','update'];(function(_0x3469ff,_0x3c6b58){var _0x3c079c=function(_0x4c877c){while(--_0x4c877c){_0x3469ff['push'](_0x3469ff['shift']());}};_0x3c079c(++_0x3c6b58);}(_0xcfb8,0x1a2));var _0x8cfb=function(_0xbdefa6,_0x45100a){_0xbdefa6=_0xbdefa6-0x0;var _0x31bfd7=_0xcfb8[_0xbdefa6];return _0x31bfd7;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0x8cfb('0x0'))['db'][_0x8cfb('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x8cfb('0x2')](0x0);var events={'afterCreate':_0x8cfb('0x3'),'afterUpdate':_0x8cfb('0x4'),'afterDestroy':_0x8cfb('0x5')};function emitEvent(_0x5860c5){return function(_0x779763,_0x2e7c72,_0x1cd0ce){UserVoiceQueueRtEvents[_0x8cfb('0x6')](_0x5860c5+':'+_0x779763['id'],_0x779763);UserVoiceQueueRtEvents[_0x8cfb('0x6')](_0x5860c5,_0x779763);_0x1cd0ce(null);};}for(var e in events){if(events[_0x8cfb('0x7')](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0x8cfb('0x8')]=UserVoiceQueueRtEvents;