Built motion from commit 00bf23f6.|2.6.16
[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 _0xeca7=['exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','update','remove','emit'];(function(_0x151d64,_0x360f73){var _0x409cfd=function(_0x152309){while(--_0x152309){_0x151d64['push'](_0x151d64['shift']());}};_0x409cfd(++_0x360f73);}(_0xeca7,0x13c));var _0x7eca=function(_0x549c39,_0x1f88de){_0x549c39=_0x549c39-0x0;var _0xb88b84=_0xeca7[_0x549c39];return _0xb88b84;};'use strict';var EventEmitter=require(_0x7eca('0x0'));var UserVoiceQueueRt=require(_0x7eca('0x1'))['db'][_0x7eca('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x7eca('0x3')](0x0);var events={'afterCreate':_0x7eca('0x4'),'afterUpdate':_0x7eca('0x5'),'afterDestroy':_0x7eca('0x6')};function emitEvent(_0x2dce46){return function(_0x5de2fa,_0x2ad030,_0xa72ee6){UserVoiceQueueRtEvents['emit'](_0x2dce46+':'+_0x5de2fa['id'],_0x5de2fa);UserVoiceQueueRtEvents[_0x7eca('0x7')](_0x2dce46,_0x5de2fa);_0xa72ee6(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0x7eca('0x8')]=UserVoiceQueueRtEvents;