Built motion from commit (unavailable).|2.5.4
[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 _0xcd15=['emit','hook','events','../../mysqldb','OpenchannelQueue','setMaxListeners'];(function(_0x5a5083,_0x1f786d){var _0x474f36=function(_0x375ba6){while(--_0x375ba6){_0x5a5083['push'](_0x5a5083['shift']());}};_0x474f36(++_0x1f786d);}(_0xcd15,0x1c4));var _0x5cd1=function(_0x4fb1b8,_0x32d98d){_0x4fb1b8=_0x4fb1b8-0x0;var _0x146c71=_0xcd15[_0x4fb1b8];return _0x146c71;};'use strict';var EventEmitter=require(_0x5cd1('0x0'));var OpenchannelQueue=require(_0x5cd1('0x1'))['db'][_0x5cd1('0x2')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0x5cd1('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x34d9fb){return function(_0x3a9dd0,_0x184582,_0x556f4f){OpenchannelQueueEvents[_0x5cd1('0x4')](_0x34d9fb+':'+_0x3a9dd0['id'],_0x3a9dd0);OpenchannelQueueEvents['emit'](_0x34d9fb,_0x3a9dd0);_0x556f4f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelQueue[_0x5cd1('0x5')](e,emitEvent(event));}}module['exports']=OpenchannelQueueEvents;