Built motion from commit (unavailable).|2.5.12
[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 _0x17c7=['emit','../../mysqldb','OpenchannelQueue','save','update'];(function(_0x383cad,_0x133407){var _0x1e8934=function(_0x4adb58){while(--_0x4adb58){_0x383cad['push'](_0x383cad['shift']());}};_0x1e8934(++_0x133407);}(_0x17c7,0xf6));var _0x717c=function(_0x2d4561,_0x463dc9){_0x2d4561=_0x2d4561-0x0;var _0x3ccfe1=_0x17c7[_0x2d4561];return _0x3ccfe1;};'use strict';var EventEmitter=require('events');var OpenchannelQueue=require(_0x717c('0x0'))['db'][_0x717c('0x1')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x717c('0x2'),'afterUpdate':_0x717c('0x3'),'afterDestroy':'remove'};function emitEvent(_0x36e092){return function(_0xdc2327,_0x239e9c,_0x438d74){OpenchannelQueueEvents[_0x717c('0x4')](_0x36e092+':'+_0xdc2327['id'],_0xdc2327);OpenchannelQueueEvents[_0x717c('0x4')](_0x36e092,_0xdc2327);_0x438d74(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelQueue['hook'](e,emitEvent(event));}}module['exports']=OpenchannelQueueEvents;