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 _0x5633=['../../mysqldb','WhatsappQueue','setMaxListeners','save','update','remove','emit','hook','events'];(function(_0x198700,_0x8119c7){var _0x1c5267=function(_0x212b8c){while(--_0x212b8c){_0x198700['push'](_0x198700['shift']());}};_0x1c5267(++_0x8119c7);}(_0x5633,0x18b));var _0x3563=function(_0x174ef5,_0x256e8e){_0x174ef5=_0x174ef5-0x0;var _0x1cc379=_0x5633[_0x174ef5];return _0x1cc379;};'use strict';var EventEmitter=require(_0x3563('0x0'));var WhatsappQueue=require(_0x3563('0x1'))['db'][_0x3563('0x2')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents[_0x3563('0x3')](0x0);var events={'afterCreate':_0x3563('0x4'),'afterUpdate':_0x3563('0x5'),'afterDestroy':_0x3563('0x6')};function emitEvent(_0x32bf79){return function(_0x2c8086,_0x46b88b,_0x1bb734){WhatsappQueueEvents[_0x3563('0x7')](_0x32bf79+':'+_0x2c8086['id'],_0x2c8086);WhatsappQueueEvents[_0x3563('0x7')](_0x32bf79,_0x2c8086);_0x1bb734(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];WhatsappQueue[_0x3563('0x8')](e,emitEvent(event));}}module['exports']=WhatsappQueueEvents;