9b6a1e36ba216f8e24a7292fc059538f20236d9b
[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 _0x753e=['update','remove','emit','hasOwnProperty','../../mysqldb','UserVoiceQueueRt','save'];(function(_0x449e1f,_0x189fbf){var _0xaa6438=function(_0x3be435){while(--_0x3be435){_0x449e1f['push'](_0x449e1f['shift']());}};_0xaa6438(++_0x189fbf);}(_0x753e,0xeb));var _0xe753=function(_0xaa0309,_0x1c8008){_0xaa0309=_0xaa0309-0x0;var _0x5de7ce=_0x753e[_0xaa0309];return _0x5de7ce;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0xe753('0x0'))['db'][_0xe753('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe753('0x2'),'afterUpdate':_0xe753('0x3'),'afterDestroy':_0xe753('0x4')};function emitEvent(_0x388aa2){return function(_0x523831,_0x28a4a7,_0x126299){UserVoiceQueueRtEvents[_0xe753('0x5')](_0x388aa2+':'+_0x523831['id'],_0x523831);UserVoiceQueueRtEvents[_0xe753('0x5')](_0x388aa2,_0x523831);_0x126299(null);};}for(var e in events){if(events[_0xe753('0x6')](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;