1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x7804=['save','update','remove','emit','hasOwnProperty','exports','../../mysqldb'];(function(_0x11154c,_0x3d1f2f){var _0x1952b8=function(_0x54e0c4){while(--_0x54e0c4){_0x11154c['push'](_0x11154c['shift']());}};_0x1952b8(++_0x3d1f2f);}(_0x7804,0x11e));var _0x4780=function(_0x471699,_0x1a9459){_0x471699=_0x471699-0x0;var _0x389a77=_0x7804[_0x471699];return _0x389a77;};'use strict';var EventEmitter=require('events');var WhatsappQueue=require(_0x4780('0x0'))['db']['WhatsappQueue'];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x4780('0x1'),'afterUpdate':_0x4780('0x2'),'afterDestroy':_0x4780('0x3')};function emitEvent(_0x48b6cb){return function(_0x145205,_0x1f7708,_0x382a2b){WhatsappQueueEvents[_0x4780('0x4')](_0x48b6cb+':'+_0x145205['id'],_0x145205);WhatsappQueueEvents[_0x4780('0x4')](_0x48b6cb,_0x145205);_0x382a2b(null);};}for(var e in events){if(events[_0x4780('0x5')](e)){var event=events[e];WhatsappQueue['hook'](e,emitEvent(event));}}module[_0x4780('0x6')]=WhatsappQueueEvents;