Built motion from commit 3c2ce842.|2.6.31
[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 _0xa1ff=['hasOwnProperty','hook','exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','update','remove','emit'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0xa1ff,0x1cf));var _0xfa1f=function(_0x345cea,_0x409aea){_0x345cea=_0x345cea-0x0;var _0x14b70e=_0xa1ff[_0x345cea];return _0x14b70e;};'use strict';var EventEmitter=require(_0xfa1f('0x0'));var UserVoiceQueueRt=require(_0xfa1f('0x1'))['db'][_0xfa1f('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xfa1f('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xfa1f('0x4'),'afterDestroy':_0xfa1f('0x5')};function emitEvent(_0x4116d9){return function(_0x51a3b6,_0x30edac,_0x27a3d5){UserVoiceQueueRtEvents[_0xfa1f('0x6')](_0x4116d9+':'+_0x51a3b6['id'],_0x51a3b6);UserVoiceQueueRtEvents[_0xfa1f('0x6')](_0x4116d9,_0x51a3b6);_0x27a3d5(null);};}for(var e in events){if(events[_0xfa1f('0x7')](e)){var event=events[e];UserVoiceQueueRt[_0xfa1f('0x8')](e,emitEvent(event));}}module[_0xfa1f('0x9')]=UserVoiceQueueRtEvents;