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 _0x60da=['remove','hasOwnProperty','hook','events','../../mysqldb'];(function(_0xf5155a,_0x1f11cc){var _0x3c844e=function(_0x3bfc55){while(--_0x3bfc55){_0xf5155a['push'](_0xf5155a['shift']());}};_0x3c844e(++_0x1f11cc);}(_0x60da,0x107));var _0xa60d=function(_0x420a3e,_0x6ef787){_0x420a3e=_0x420a3e-0x0;var _0x1e8d53=_0x60da[_0x420a3e];return _0x1e8d53;};'use strict';var EventEmitter=require(_0xa60d('0x0'));var WhatsappAccount=require(_0xa60d('0x1'))['db']['WhatsappAccount'];var WhatsappAccountEvents=new EventEmitter();WhatsappAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xa60d('0x2')};function emitEvent(_0x31485c){return function(_0x51c9a5,_0x11ae90,_0x20e74c){WhatsappAccountEvents['emit'](_0x31485c+':'+_0x51c9a5['id'],_0x51c9a5);WhatsappAccountEvents['emit'](_0x31485c,_0x51c9a5);_0x20e74c(null);};}for(var e in events){if(events[_0xa60d('0x3')](e)){var event=events[e];WhatsappAccount[_0xa60d('0x4')](e,emitEvent(event));}}module['exports']=WhatsappAccountEvents;