Built motion from commit (unavailable).|2.3.3
[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 _0x241d=['OpenchannelQueue','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','../../mysqldb'];(function(_0x216675,_0x50c3fc){var _0x3032e5=function(_0x1f57cd){while(--_0x1f57cd){_0x216675['push'](_0x216675['shift']());}};_0x3032e5(++_0x50c3fc);}(_0x241d,0xa1));var _0xd241=function(_0x278e3c,_0x1c9cfd){_0x278e3c=_0x278e3c-0x0;var _0x3e2d9b=_0x241d[_0x278e3c];return _0x3e2d9b;};'use strict';var EventEmitter=require('events');var OpenchannelQueue=require(_0xd241('0x0'))['db'][_0xd241('0x1')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0xd241('0x2')](0x0);var events={'afterCreate':_0xd241('0x3'),'afterUpdate':_0xd241('0x4'),'afterDestroy':_0xd241('0x5')};function emitEvent(_0x1bc456){return function(_0x5ca15b,_0x4b69fe,_0x3d7f52){OpenchannelQueueEvents[_0xd241('0x6')](_0x1bc456+':'+_0x5ca15b['id'],_0x5ca15b);OpenchannelQueueEvents[_0xd241('0x6')](_0x1bc456,_0x5ca15b);_0x3d7f52(null);};}for(var e in events){if(events[_0xd241('0x7')](e)){var event=events[e];OpenchannelQueue[_0xd241('0x8')](e,emitEvent(event));}}module['exports']=OpenchannelQueueEvents;