Built motion from commit a9fb64cc6defd8fb3a5cc199221f878e91c0e969. Version 3.0.0...
[motion-next.git] / server / api / whatsappQueue / whatsappQueue.events.js
1 const a809_0x27e6=['../../mysqldb','update','save','emit','remove','exports','addHook','undefined','WhatsappQueue'];(function(_0x10c2ea,_0x27e649){const _0x1b411b=function(_0x2bffe7){while(--_0x2bffe7){_0x10c2ea['push'](_0x10c2ea['shift']());}};_0x1b411b(++_0x27e649);}(a809_0x27e6,0xb5));const a809_0x1b41=function(_0x10c2ea,_0x27e649){_0x10c2ea=_0x10c2ea-0x0;let _0x1b411b=a809_0x27e6[_0x10c2ea];return _0x1b411b;};const _0x378fb1=a809_0x1b41;'use strict';const EventEmitter=require('events'),WhatsappQueue=require(_0x378fb1('0x8'))['db'][_0x378fb1('0x7')],WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents['setMaxListeners'](0x0);const events={'afterCreate':_0x378fb1('0x1'),'afterUpdate':_0x378fb1('0x0'),'afterDestroy':_0x378fb1('0x3')};function emitEvent(_0x2bffe7){return function(_0x25142d){const _0x1658b7=a809_0x1b41;WhatsappQueueEvents['emit'](_0x2bffe7+':'+_0x25142d['id'],_0x25142d),WhatsappQueueEvents[_0x1658b7('0x2')](_0x2bffe7,_0x25142d);};}for(const e in events){if(typeof events[e]!==_0x378fb1('0x6')){const event=events[e];WhatsappQueue[_0x378fb1('0x5')](e,emitEvent(event));}}module[_0x378fb1('0x4')]=WhatsappQueueEvents;