Built motion from commit 97153652.|2.6.26
[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 _0x90ab=['setMaxListeners','update','remove','emit','hook','exports','UserVoiceQueueRt'];(function(_0x3fb150,_0x5e32ed){var _0x56f4a8=function(_0x57924c){while(--_0x57924c){_0x3fb150['push'](_0x3fb150['shift']());}};_0x56f4a8(++_0x5e32ed);}(_0x90ab,0xb5));var _0xb90a=function(_0x1d4d75,_0x48b6b4){_0x1d4d75=_0x1d4d75-0x0;var _0x11316d=_0x90ab[_0x1d4d75];return _0x11316d;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require('../../mysqldb')['db'][_0xb90a('0x0')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xb90a('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0xb90a('0x2'),'afterDestroy':_0xb90a('0x3')};function emitEvent(_0x187421){return function(_0x1e45c9,_0x422dab,_0x1b50e9){UserVoiceQueueRtEvents[_0xb90a('0x4')](_0x187421+':'+_0x1e45c9['id'],_0x1e45c9);UserVoiceQueueRtEvents[_0xb90a('0x4')](_0x187421,_0x1e45c9);_0x1b50e9(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0xb90a('0x5')](e,emitEvent(event));}}module[_0xb90a('0x6')]=UserVoiceQueueRtEvents;