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 _0x5501=['WhatsappQueue','setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0xe68104,_0xe57d82){var _0x217a0f=function(_0x1e04b0){while(--_0x1e04b0){_0xe68104['push'](_0xe68104['shift']());}};_0x217a0f(++_0xe57d82);}(_0x5501,0x10d));var _0x1550=function(_0x3ccd2d,_0x53ef04){_0x3ccd2d=_0x3ccd2d-0x0;var _0x3f70a9=_0x5501[_0x3ccd2d];return _0x3f70a9;};'use strict';var EventEmitter=require('events');var WhatsappQueue=require(_0x1550('0x0'))['db'][_0x1550('0x1')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents[_0x1550('0x2')](0x0);var events={'afterCreate':_0x1550('0x3'),'afterUpdate':'update','afterDestroy':_0x1550('0x4')};function emitEvent(_0x555815){return function(_0xf37997,_0x585a56,_0x46b618){WhatsappQueueEvents[_0x1550('0x5')](_0x555815+':'+_0xf37997['id'],_0xf37997);WhatsappQueueEvents['emit'](_0x555815,_0xf37997);_0x46b618(null);};}for(var e in events){if(events[_0x1550('0x6')](e)){var event=events[e];WhatsappQueue[_0x1550('0x7')](e,emitEvent(event));}}module[_0x1550('0x8')]=WhatsappQueueEvents;