Built motion from commit da24aabd.|2.6.20
[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 _0x511e=['../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','remove','emit','hook','exports','events'];(function(_0x337945,_0x19ad92){var _0x16a9d2=function(_0x55ac11){while(--_0x55ac11){_0x337945['push'](_0x337945['shift']());}};_0x16a9d2(++_0x19ad92);}(_0x511e,0x155));var _0xe511=function(_0xa3463d,_0x32f8da){_0xa3463d=_0xa3463d-0x0;var _0x50fd67=_0x511e[_0xa3463d];return _0x50fd67;};'use strict';var EventEmitter=require(_0xe511('0x0'));var UserVoiceQueueRt=require(_0xe511('0x1'))['db'][_0xe511('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xe511('0x3')](0x0);var events={'afterCreate':_0xe511('0x4'),'afterUpdate':'update','afterDestroy':_0xe511('0x5')};function emitEvent(_0x3fa923){return function(_0x43093f,_0x439746,_0x37a33a){UserVoiceQueueRtEvents[_0xe511('0x6')](_0x3fa923+':'+_0x43093f['id'],_0x43093f);UserVoiceQueueRtEvents['emit'](_0x3fa923,_0x43093f);_0x37a33a(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0xe511('0x7')](e,emitEvent(event));}}module[_0xe511('0x8')]=UserVoiceQueueRtEvents;