Built motion from commit 9d0783e6.|2.6.13
[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 _0xfd07=['save','update','remove','emit','hook','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners'];(function(_0x44a5c7,_0x20cfef){var _0x183951=function(_0x1c5e31){while(--_0x1c5e31){_0x44a5c7['push'](_0x44a5c7['shift']());}};_0x183951(++_0x20cfef);}(_0xfd07,0x16d));var _0x7fd0=function(_0x55c3d9,_0x3bf75c){_0x55c3d9=_0x55c3d9-0x0;var _0x19fd97=_0xfd07[_0x55c3d9];return _0x19fd97;};'use strict';var EventEmitter=require(_0x7fd0('0x0'));var UserVoiceQueueRt=require(_0x7fd0('0x1'))['db'][_0x7fd0('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x7fd0('0x3')](0x0);var events={'afterCreate':_0x7fd0('0x4'),'afterUpdate':_0x7fd0('0x5'),'afterDestroy':_0x7fd0('0x6')};function emitEvent(_0x4dca03){return function(_0x5ec751,_0x17097b,_0xb472f0){UserVoiceQueueRtEvents[_0x7fd0('0x7')](_0x4dca03+':'+_0x5ec751['id'],_0x5ec751);UserVoiceQueueRtEvents[_0x7fd0('0x7')](_0x4dca03,_0x5ec751);_0xb472f0(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0x7fd0('0x8')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;