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 _0xf782=['remove','exports','events','../../mysqldb','WhatsappQueue','save'];(function(_0x2aefb6,_0x1bd384){var _0x202772=function(_0x507d3f){while(--_0x507d3f){_0x2aefb6['push'](_0x2aefb6['shift']());}};_0x202772(++_0x1bd384);}(_0xf782,0x164));var _0x2f78=function(_0x924c29,_0x309120){_0x924c29=_0x924c29-0x0;var _0x24ddd6=_0xf782[_0x924c29];return _0x24ddd6;};'use strict';var EventEmitter=require(_0x2f78('0x0'));var WhatsappQueue=require(_0x2f78('0x1'))['db'][_0x2f78('0x2')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x2f78('0x3'),'afterUpdate':'update','afterDestroy':_0x2f78('0x4')};function emitEvent(_0x64ec5f){return function(_0x1570cc,_0x4c2807,_0x50e35f){WhatsappQueueEvents['emit'](_0x64ec5f+':'+_0x1570cc['id'],_0x1570cc);WhatsappQueueEvents['emit'](_0x64ec5f,_0x1570cc);_0x50e35f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];WhatsappQueue['hook'](e,emitEvent(event));}}module[_0x2f78('0x5')]=WhatsappQueueEvents;