Built motion from commit (unavailable).|2.5.20
[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 _0xe7b2=['events','UserVoiceQueueRt','save','update','remove','emit'];(function(_0x54afec,_0x2c9a09){var _0x54f048=function(_0xa431a7){while(--_0xa431a7){_0x54afec['push'](_0x54afec['shift']());}};_0x54f048(++_0x2c9a09);}(_0xe7b2,0xea));var _0x2e7b=function(_0x2b5d81,_0xd7d42d){_0x2b5d81=_0x2b5d81-0x0;var _0x4d09ac=_0xe7b2[_0x2b5d81];return _0x4d09ac;};'use strict';var EventEmitter=require(_0x2e7b('0x0'));var UserVoiceQueueRt=require('../../mysqldb')['db'][_0x2e7b('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x2e7b('0x2'),'afterUpdate':_0x2e7b('0x3'),'afterDestroy':_0x2e7b('0x4')};function emitEvent(_0x3a7a6b){return function(_0x3c7aff,_0x2b1e31,_0x266130){UserVoiceQueueRtEvents[_0x2e7b('0x5')](_0x3a7a6b+':'+_0x3c7aff['id'],_0x3c7aff);UserVoiceQueueRtEvents[_0x2e7b('0x5')](_0x3a7a6b,_0x3c7aff);_0x266130(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;