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 _0x82db=['remove','hook','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save'];(function(_0x287ed0,_0x1bc2f5){var _0x58061a=function(_0x3dd875){while(--_0x3dd875){_0x287ed0['push'](_0x287ed0['shift']());}};_0x58061a(++_0x1bc2f5);}(_0x82db,0x1bb));var _0xb82d=function(_0x331062,_0x2e37c7){_0x331062=_0x331062-0x0;var _0x587038=_0x82db[_0x331062];return _0x587038;};'use strict';var EventEmitter=require(_0xb82d('0x0'));var UserVoiceQueueRt=require(_0xb82d('0x1'))['db'][_0xb82d('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xb82d('0x3')](0x0);var events={'afterCreate':_0xb82d('0x4'),'afterUpdate':'update','afterDestroy':_0xb82d('0x5')};function emitEvent(_0x2af5ce){return function(_0x551041,_0x3d0cf5,_0x505e8a){UserVoiceQueueRtEvents['emit'](_0x2af5ce+':'+_0x551041['id'],_0x551041);UserVoiceQueueRtEvents['emit'](_0x2af5ce,_0x551041);_0x505e8a(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0xb82d('0x6')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;