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 _0x7d16=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','WhatsappAccount','save'];(function(_0x244f5d,_0x3c98c6){var _0x1a3886=function(_0x2bf049){while(--_0x2bf049){_0x244f5d['push'](_0x244f5d['shift']());}};_0x1a3886(++_0x3c98c6);}(_0x7d16,0x101));var _0x67d1=function(_0x100a33,_0x377f36){_0x100a33=_0x100a33-0x0;var _0x19172d=_0x7d16[_0x100a33];return _0x19172d;};'use strict';var EventEmitter=require(_0x67d1('0x0'));var WhatsappAccount=require(_0x67d1('0x1'))['db'][_0x67d1('0x2')];var WhatsappAccountEvents=new EventEmitter();WhatsappAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x67d1('0x3'),'afterUpdate':'update','afterDestroy':_0x67d1('0x4')};function emitEvent(_0x23b403){return function(_0x5e293c,_0x59cfd4,_0x5afdee){WhatsappAccountEvents['emit'](_0x23b403+':'+_0x5e293c['id'],_0x5e293c);WhatsappAccountEvents[_0x67d1('0x5')](_0x23b403,_0x5e293c);_0x5afdee(null);};}for(var e in events){if(events[_0x67d1('0x6')](e)){var event=events[e];WhatsappAccount[_0x67d1('0x7')](e,emitEvent(event));}}module[_0x67d1('0x8')]=WhatsappAccountEvents;