Built motion from commit 10af8726.|2.6.34
[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 _0xd039=['hasOwnProperty','hook','exports','../../mysqldb','remove','emit'];(function(_0x5985ef,_0x255113){var _0x1668bd=function(_0x32352f){while(--_0x32352f){_0x5985ef['push'](_0x5985ef['shift']());}};_0x1668bd(++_0x255113);}(_0xd039,0x6f));var _0x9d03=function(_0x3f5166,_0x1f2652){_0x3f5166=_0x3f5166-0x0;var _0x37557f=_0xd039[_0x3f5166];return _0x37557f;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0x9d03('0x0'))['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x9d03('0x1')};function emitEvent(_0x1038a9){return function(_0x29db29,_0x564aa9,_0x2f53c3){UserVoiceQueueRtEvents['emit'](_0x1038a9+':'+_0x29db29['id'],_0x29db29);UserVoiceQueueRtEvents[_0x9d03('0x2')](_0x1038a9,_0x29db29);_0x2f53c3(null);};}for(var e in events){if(events[_0x9d03('0x3')](e)){var event=events[e];UserVoiceQueueRt[_0x9d03('0x4')](e,emitEvent(event));}}module[_0x9d03('0x5')]=UserVoiceQueueRtEvents;