Built motion from commit (unavailable).|2.5.6
[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 _0xba7e=['setMaxListeners','save','update','emit','hasOwnProperty','hook','exports','../../mysqldb','UserVoiceQueueRt'];(function(_0x3b9954,_0x2c0711){var _0x30f058=function(_0x3b86b0){while(--_0x3b86b0){_0x3b9954['push'](_0x3b9954['shift']());}};_0x30f058(++_0x2c0711);}(_0xba7e,0x103));var _0xeba7=function(_0x4adff1,_0x4a8cbe){_0x4adff1=_0x4adff1-0x0;var _0x318759=_0xba7e[_0x4adff1];return _0x318759;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0xeba7('0x0'))['db'][_0xeba7('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xeba7('0x2')](0x0);var events={'afterCreate':_0xeba7('0x3'),'afterUpdate':_0xeba7('0x4'),'afterDestroy':'remove'};function emitEvent(_0x35a2e4){return function(_0x37b17d,_0x4159f0,_0x13fddf){UserVoiceQueueRtEvents[_0xeba7('0x5')](_0x35a2e4+':'+_0x37b17d['id'],_0x37b17d);UserVoiceQueueRtEvents[_0xeba7('0x5')](_0x35a2e4,_0x37b17d);_0x13fddf(null);};}for(var e in events){if(events[_0xeba7('0x6')](e)){var event=events[e];UserVoiceQueueRt[_0xeba7('0x7')](e,emitEvent(event));}}module[_0xeba7('0x8')]=UserVoiceQueueRtEvents;