Built motion from commit 85328c08.|2.5.50
[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 _0xd3b5=['UserVoiceQueueRt','setMaxListeners','update','remove','emit','hasOwnProperty','events'];(function(_0x27620d,_0x432c05){var _0x2292cc=function(_0x10cb1d){while(--_0x10cb1d){_0x27620d['push'](_0x27620d['shift']());}};_0x2292cc(++_0x432c05);}(_0xd3b5,0x148));var _0x5d3b=function(_0x52f1e6,_0xf70489){_0x52f1e6=_0x52f1e6-0x0;var _0x21f104=_0xd3b5[_0x52f1e6];return _0x21f104;};'use strict';var EventEmitter=require(_0x5d3b('0x0'));var UserVoiceQueueRt=require('../../mysqldb')['db'][_0x5d3b('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x5d3b('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x5d3b('0x3'),'afterDestroy':_0x5d3b('0x4')};function emitEvent(_0x18a718){return function(_0x2cfafe,_0x1280e0,_0x14e6f3){UserVoiceQueueRtEvents[_0x5d3b('0x5')](_0x18a718+':'+_0x2cfafe['id'],_0x2cfafe);UserVoiceQueueRtEvents['emit'](_0x18a718,_0x2cfafe);_0x14e6f3(null);};}for(var e in events){if(events[_0x5d3b('0x6')](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;