Built motion from commit (unavailable).|2.2.0
[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 _0x3b49=['save','update','remove','emit','hasOwnProperty','hook','exports','events','UserVoiceQueueRt'];(function(_0x49d007,_0x1ca535){var _0x2cbb84=function(_0x2368f6){while(--_0x2368f6){_0x49d007['push'](_0x49d007['shift']());}};_0x2cbb84(++_0x1ca535);}(_0x3b49,0xdf));var _0x93b4=function(_0x2d2c16,_0x4e88b6){_0x2d2c16=_0x2d2c16-0x0;var _0x53f2fb=_0x3b49[_0x2d2c16];return _0x53f2fb;};'use strict';var EventEmitter=require(_0x93b4('0x0'));var UserVoiceQueueRt=require('../../mysqldb')['db'][_0x93b4('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x93b4('0x2'),'afterUpdate':_0x93b4('0x3'),'afterDestroy':_0x93b4('0x4')};function emitEvent(_0x5169a5){return function(_0x32a155,_0x6c32cc,_0x25fd94){UserVoiceQueueRtEvents[_0x93b4('0x5')](_0x5169a5+':'+_0x32a155['id'],_0x32a155);UserVoiceQueueRtEvents[_0x93b4('0x5')](_0x5169a5,_0x32a155);_0x25fd94(null);};}for(var e in events){if(events[_0x93b4('0x6')](e)){var event=events[e];UserVoiceQueueRt[_0x93b4('0x7')](e,emitEvent(event));}}module[_0x93b4('0x8')]=UserVoiceQueueRtEvents;