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 _0x28c3=['../../mysqldb','WhatsappQueue','setMaxListeners','save','remove','emit','hasOwnProperty','exports','events'];(function(_0xea9b9d,_0x2bcb5d){var _0x3ce85d=function(_0x51e594){while(--_0x51e594){_0xea9b9d['push'](_0xea9b9d['shift']());}};_0x3ce85d(++_0x2bcb5d);}(_0x28c3,0x116));var _0x328c=function(_0xfca3f3,_0x4b4071){_0xfca3f3=_0xfca3f3-0x0;var _0x17cf46=_0x28c3[_0xfca3f3];return _0x17cf46;};'use strict';var EventEmitter=require(_0x328c('0x0'));var WhatsappQueue=require(_0x328c('0x1'))['db'][_0x328c('0x2')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents[_0x328c('0x3')](0x0);var events={'afterCreate':_0x328c('0x4'),'afterUpdate':'update','afterDestroy':_0x328c('0x5')};function emitEvent(_0x417cd2){return function(_0xfc6a31,_0x4076ce,_0x464e31){WhatsappQueueEvents[_0x328c('0x6')](_0x417cd2+':'+_0xfc6a31['id'],_0xfc6a31);WhatsappQueueEvents[_0x328c('0x6')](_0x417cd2,_0xfc6a31);_0x464e31(null);};}for(var e in events){if(events[_0x328c('0x7')](e)){var event=events[e];WhatsappQueue['hook'](e,emitEvent(event));}}module[_0x328c('0x8')]=WhatsappQueueEvents;