Built motion from commit 9d7072cc.|2.5.39
[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 _0x5a05=['update','remove','emit','exports','setMaxListeners','save'];(function(_0x26a2a2,_0x1b6f62){var _0x384c71=function(_0x5d5bc1){while(--_0x5d5bc1){_0x26a2a2['push'](_0x26a2a2['shift']());}};_0x384c71(++_0x1b6f62);}(_0x5a05,0x112));var _0x55a0=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x5a05[_0x321bb2];return _0x9c12ed;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require('../../mysqldb')['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x55a0('0x0')](0x0);var events={'afterCreate':_0x55a0('0x1'),'afterUpdate':_0x55a0('0x2'),'afterDestroy':_0x55a0('0x3')};function emitEvent(_0x2d51c5){return function(_0x44eb6e,_0x473b81,_0x42c154){UserVoiceQueueRtEvents[_0x55a0('0x4')](_0x2d51c5+':'+_0x44eb6e['id'],_0x44eb6e);UserVoiceQueueRtEvents[_0x55a0('0x4')](_0x2d51c5,_0x44eb6e);_0x42c154(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0x55a0('0x5')]=UserVoiceQueueRtEvents;