Built motion from commit (unavailable).|2.5.8
[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 _0xb69d=['UserVoiceQueueRt','setMaxListeners','save','update','remove','emit','hook','exports'];(function(_0x2369f4,_0x3d7e41){var _0x3bf550=function(_0x4b5a0c){while(--_0x4b5a0c){_0x2369f4['push'](_0x2369f4['shift']());}};_0x3bf550(++_0x3d7e41);}(_0xb69d,0xe0));var _0xdb69=function(_0x5ccb78,_0x5ddd51){_0x5ccb78=_0x5ccb78-0x0;var _0x4fe34c=_0xb69d[_0x5ccb78];return _0x4fe34c;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require('../../mysqldb')['db'][_0xdb69('0x0')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xdb69('0x1')](0x0);var events={'afterCreate':_0xdb69('0x2'),'afterUpdate':_0xdb69('0x3'),'afterDestroy':_0xdb69('0x4')};function emitEvent(_0x286033){return function(_0x372156,_0x290183,_0x2c0aae){UserVoiceQueueRtEvents[_0xdb69('0x5')](_0x286033+':'+_0x372156['id'],_0x372156);UserVoiceQueueRtEvents[_0xdb69('0x5')](_0x286033,_0x372156);_0x2c0aae(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0xdb69('0x6')](e,emitEvent(event));}}module[_0xdb69('0x7')]=UserVoiceQueueRtEvents;