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 _0x91de=['WhatsappQueue','setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x558128,_0x149f37){var _0x10e830=function(_0x567ea6){while(--_0x567ea6){_0x558128['push'](_0x558128['shift']());}};_0x10e830(++_0x149f37);}(_0x91de,0x18e));var _0xe91d=function(_0x56ccf3,_0x37c34b){_0x56ccf3=_0x56ccf3-0x0;var _0x24677a=_0x91de[_0x56ccf3];return _0x24677a;};'use strict';var EventEmitter=require(_0xe91d('0x0'));var WhatsappQueue=require(_0xe91d('0x1'))['db'][_0xe91d('0x2')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents[_0xe91d('0x3')](0x0);var events={'afterCreate':_0xe91d('0x4'),'afterUpdate':'update','afterDestroy':_0xe91d('0x5')};function emitEvent(_0x30c8c4){return function(_0x4bee49,_0x2f20b2,_0x56313b){WhatsappQueueEvents[_0xe91d('0x6')](_0x30c8c4+':'+_0x4bee49['id'],_0x4bee49);WhatsappQueueEvents[_0xe91d('0x6')](_0x30c8c4,_0x4bee49);_0x56313b(null);};}for(var e in events){if(events[_0xe91d('0x7')](e)){var event=events[e];WhatsappQueue[_0xe91d('0x8')](e,emitEvent(event));}}module[_0xe91d('0x9')]=WhatsappQueueEvents;