Built motion from commit (unavailable).|2.5.8
[motion2.git] / server / api / openchannelQueue / openchannelQueue.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 _0xf598=['../../mysqldb','setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x38ce4c,_0xfdbe8c){var _0x5d4544=function(_0x503537){while(--_0x503537){_0x38ce4c['push'](_0x38ce4c['shift']());}};_0x5d4544(++_0xfdbe8c);}(_0xf598,0xa8));var _0x8f59=function(_0x2f2797,_0x2207df){_0x2f2797=_0x2f2797-0x0;var _0x23d8fb=_0xf598[_0x2f2797];return _0x23d8fb;};'use strict';var EventEmitter=require('events');var OpenchannelQueue=require(_0x8f59('0x0'))['db']['OpenchannelQueue'];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0x8f59('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0x8f59('0x2'),'afterDestroy':_0x8f59('0x3')};function emitEvent(_0x3d1572){return function(_0x47edb6,_0x262a6c,_0x37755f){OpenchannelQueueEvents['emit'](_0x3d1572+':'+_0x47edb6['id'],_0x47edb6);OpenchannelQueueEvents[_0x8f59('0x4')](_0x3d1572,_0x47edb6);_0x37755f(null);};}for(var e in events){if(events[_0x8f59('0x5')](e)){var event=events[e];OpenchannelQueue[_0x8f59('0x6')](e,emitEvent(event));}}module[_0x8f59('0x7')]=OpenchannelQueueEvents;