Built motion from commit 5ad77b03.|2.6.3
[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 _0x0ec1=['events','UserVoiceQueueRt','save','update','emit','hasOwnProperty','hook','exports'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x0ec1,0xa0));var _0x10ec=function(_0x11b0d3,_0x29202b){_0x11b0d3=_0x11b0d3-0x0;var _0x7c05c7=_0x0ec1[_0x11b0d3];return _0x7c05c7;};'use strict';var EventEmitter=require(_0x10ec('0x0'));var UserVoiceQueueRt=require('../../mysqldb')['db'][_0x10ec('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x10ec('0x2'),'afterUpdate':_0x10ec('0x3'),'afterDestroy':'remove'};function emitEvent(_0x31530f){return function(_0x5061f1,_0x3aaeed,_0x382de7){UserVoiceQueueRtEvents[_0x10ec('0x4')](_0x31530f+':'+_0x5061f1['id'],_0x5061f1);UserVoiceQueueRtEvents[_0x10ec('0x4')](_0x31530f,_0x5061f1);_0x382de7(null);};}for(var e in events){if(events[_0x10ec('0x5')](e)){var event=events[e];UserVoiceQueueRt[_0x10ec('0x6')](e,emitEvent(event));}}module[_0x10ec('0x7')]=UserVoiceQueueRtEvents;