d0d5db6b6c15c7edbe37b9b35a2d3317c5261a39
[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 _0x2c59=['emit','hasOwnProperty','hook','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','update'];(function(_0x22ce39,_0x5286db){var _0x4a884a=function(_0x231f63){while(--_0x231f63){_0x22ce39['push'](_0x22ce39['shift']());}};_0x4a884a(++_0x5286db);}(_0x2c59,0x147));var _0x92c5=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x2c59[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0x92c5('0x0'));var UserVoiceQueueRt=require(_0x92c5('0x1'))['db'][_0x92c5('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x92c5('0x3')](0x0);var events={'afterCreate':_0x92c5('0x4'),'afterUpdate':_0x92c5('0x5'),'afterDestroy':'remove'};function emitEvent(_0x1c39d4){return function(_0x1c6a92,_0x2b9cfa,_0x597c35){UserVoiceQueueRtEvents[_0x92c5('0x6')](_0x1c39d4+':'+_0x1c6a92['id'],_0x1c6a92);UserVoiceQueueRtEvents[_0x92c5('0x6')](_0x1c39d4,_0x1c6a92);_0x597c35(null);};}for(var e in events){if(events[_0x92c5('0x7')](e)){var event=events[e];UserVoiceQueueRt[_0x92c5('0x8')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;