Built motion from commit 71df090e.|2.6.31
[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 _0xccbc=['remove','emit','hook','exports','events','../../mysqldb','UserVoiceQueueRt','save'];(function(_0xf01579,_0x914885){var _0x146774=function(_0x57ebfc){while(--_0x57ebfc){_0xf01579['push'](_0xf01579['shift']());}};_0x146774(++_0x914885);}(_0xccbc,0x16c));var _0xcccb=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xccbc[_0x122ef9];return _0x42fba0;};'use strict';var EventEmitter=require(_0xcccb('0x0'));var UserVoiceQueueRt=require(_0xcccb('0x1'))['db'][_0xcccb('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xcccb('0x3'),'afterUpdate':'update','afterDestroy':_0xcccb('0x4')};function emitEvent(_0x3e77e3){return function(_0x599150,_0x337641,_0x139d81){UserVoiceQueueRtEvents[_0xcccb('0x5')](_0x3e77e3+':'+_0x599150['id'],_0x599150);UserVoiceQueueRtEvents[_0xcccb('0x5')](_0x3e77e3,_0x599150);_0x139d81(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0xcccb('0x6')](e,emitEvent(event));}}module[_0xcccb('0x7')]=UserVoiceQueueRtEvents;