Built motion from commit ecf5ab8ec560fd4c6972692268e350fcef2f38e7. Version 3.0.0...
[motion-next.git] / server / api / whatsappQueue / whatsappQueue.events.js
1 const a809_0x30ab=['remove','WhatsappQueue','../../mysqldb','events','update','emit','setMaxListeners','save','addHook'];(function(_0x4756e3,_0x30abf0){const _0x3b4293=function(_0x22415d){while(--_0x22415d){_0x4756e3['push'](_0x4756e3['shift']());}};_0x3b4293(++_0x30abf0);}(a809_0x30ab,0x88));const a809_0x3b42=function(_0x4756e3,_0x30abf0){_0x4756e3=_0x4756e3-0x0;let _0x3b4293=a809_0x30ab[_0x4756e3];return _0x3b4293;};const _0x20bc90=a809_0x3b42;'use strict';const EventEmitter=require(_0x20bc90('0x2')),WhatsappQueue=require(_0x20bc90('0x1'))['db'][_0x20bc90('0x0')],WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents[_0x20bc90('0x5')](0x0);const events={'afterCreate':_0x20bc90('0x6'),'afterUpdate':_0x20bc90('0x3'),'afterDestroy':_0x20bc90('0x8')};function emitEvent(_0x22415d){return function(_0x506265){const _0x3d123f=a809_0x3b42;WhatsappQueueEvents['emit'](_0x22415d+':'+_0x506265['id'],_0x506265),WhatsappQueueEvents[_0x3d123f('0x4')](_0x22415d,_0x506265);};}for(const e in events){if(typeof events[e]!=='undefined'){const event=events[e];WhatsappQueue[_0x20bc90('0x7')](e,emitEvent(event));}}module['exports']=WhatsappQueueEvents;