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 _0x1267=['exports','events','../../mysqldb','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x40bffc,_0x3a45d7){var _0x3007e9=function(_0x4c8fda){while(--_0x4c8fda){_0x40bffc['push'](_0x40bffc['shift']());}};_0x3007e9(++_0x3a45d7);}(_0x1267,0xb5));var _0x7126=function(_0x358ab3,_0x293a22){_0x358ab3=_0x358ab3-0x0;var _0x1b3535=_0x1267[_0x358ab3];return _0x1b3535;};'use strict';var EventEmitter=require(_0x7126('0x0'));var MailAccount=require(_0x7126('0x1'))['db']['MailAccount'];var MailAccountEvents=new EventEmitter();MailAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x7126('0x2'),'afterUpdate':_0x7126('0x3'),'afterDestroy':_0x7126('0x4')};function emitEvent(_0x3587d0){return function(_0x35f8e5,_0x403ed4,_0x4346f7){MailAccountEvents['emit'](_0x3587d0+':'+_0x35f8e5['id'],_0x35f8e5);MailAccountEvents[_0x7126('0x5')](_0x3587d0,_0x35f8e5);_0x4346f7(null);};}for(var e in events){if(events[_0x7126('0x6')](e)){var event=events[e];MailAccount[_0x7126('0x7')](e,emitEvent(event));}}module[_0x7126('0x8')]=MailAccountEvents;