Built motion from commit (unavailable).|2.4.21
[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 _0x7f74=['UserVoiceQueueRt','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x3f6ea3,_0x56bfdd){var _0x2dd904=function(_0x1b3c0a){while(--_0x1b3c0a){_0x3f6ea3['push'](_0x3f6ea3['shift']());}};_0x2dd904(++_0x56bfdd);}(_0x7f74,0xfb));var _0x47f7=function(_0x135d20,_0x5caed1){_0x135d20=_0x135d20-0x0;var _0x4e0609=_0x7f74[_0x135d20];return _0x4e0609;};'use strict';var EventEmitter=require(_0x47f7('0x0'));var UserVoiceQueueRt=require(_0x47f7('0x1'))['db'][_0x47f7('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x47f7('0x3')](0x0);var events={'afterCreate':_0x47f7('0x4'),'afterUpdate':_0x47f7('0x5'),'afterDestroy':_0x47f7('0x6')};function emitEvent(_0x58c25c){return function(_0x51d31d,_0x217a2d,_0x432eb3){UserVoiceQueueRtEvents[_0x47f7('0x7')](_0x58c25c+':'+_0x51d31d['id'],_0x51d31d);UserVoiceQueueRtEvents[_0x47f7('0x7')](_0x58c25c,_0x51d31d);_0x432eb3(null);};}for(var e in events){if(events[_0x47f7('0x8')](e)){var event=events[e];UserVoiceQueueRt[_0x47f7('0x9')](e,emitEvent(event));}}module[_0x47f7('0xa')]=UserVoiceQueueRtEvents;