76b225ec67e8ed84386602b112a98bbfa49eaa4f
[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 _0x0c7e=['exports','../../mysqldb','setMaxListeners','save','update','remove','emit'];(function(_0x3b977c,_0x480969){var _0x1fde43=function(_0x53b002){while(--_0x53b002){_0x3b977c['push'](_0x3b977c['shift']());}};_0x1fde43(++_0x480969);}(_0x0c7e,0x143));var _0xe0c7=function(_0x3a7922,_0x48a91f){_0x3a7922=_0x3a7922-0x0;var _0x24a9ca=_0x0c7e[_0x3a7922];return _0x24a9ca;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0xe0c7('0x0'))['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xe0c7('0x1')](0x0);var events={'afterCreate':_0xe0c7('0x2'),'afterUpdate':_0xe0c7('0x3'),'afterDestroy':_0xe0c7('0x4')};function emitEvent(_0x42ea20){return function(_0x35b743,_0x2ba648,_0x26a20b){UserVoiceQueueRtEvents[_0xe0c7('0x5')](_0x42ea20+':'+_0x35b743['id'],_0x35b743);UserVoiceQueueRtEvents[_0xe0c7('0x5')](_0x42ea20,_0x35b743);_0x26a20b(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0xe0c7('0x6')]=UserVoiceQueueRtEvents;