c63641485e2f25a0d85fb83088aee0146694aa22
[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 _0x99f2=['hook','exports','events','../../mysqldb','save','update','remove','emit','hasOwnProperty'];(function(_0x8c5e29,_0x2cee42){var _0x5a3c86=function(_0x196cca){while(--_0x196cca){_0x8c5e29['push'](_0x8c5e29['shift']());}};_0x5a3c86(++_0x2cee42);}(_0x99f2,0x146));var _0x299f=function(_0x1c64ca,_0x1ad0ca){_0x1c64ca=_0x1c64ca-0x0;var _0x321792=_0x99f2[_0x1c64ca];return _0x321792;};'use strict';var EventEmitter=require(_0x299f('0x0'));var UserVoiceQueueRt=require(_0x299f('0x1'))['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x299f('0x2'),'afterUpdate':_0x299f('0x3'),'afterDestroy':_0x299f('0x4')};function emitEvent(_0x57b6be){return function(_0x1a89d2,_0x82c108,_0x4fc948){UserVoiceQueueRtEvents[_0x299f('0x5')](_0x57b6be+':'+_0x1a89d2['id'],_0x1a89d2);UserVoiceQueueRtEvents[_0x299f('0x5')](_0x57b6be,_0x1a89d2);_0x4fc948(null);};}for(var e in events){if(events[_0x299f('0x6')](e)){var event=events[e];UserVoiceQueueRt[_0x299f('0x7')](e,emitEvent(event));}}module[_0x299f('0x8')]=UserVoiceQueueRtEvents;