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 _0x8bf3=['MailAccount','setMaxListeners','save','update','remove','emit','hook','events','../../mysqldb'];(function(_0x350343,_0x256f69){var _0x9afc1c=function(_0x47ab32){while(--_0x47ab32){_0x350343['push'](_0x350343['shift']());}};_0x9afc1c(++_0x256f69);}(_0x8bf3,0x130));var _0x38bf=function(_0x322da7,_0x249a61){_0x322da7=_0x322da7-0x0;var _0x268f47=_0x8bf3[_0x322da7];return _0x268f47;};'use strict';var EventEmitter=require(_0x38bf('0x0'));var MailAccount=require(_0x38bf('0x1'))['db'][_0x38bf('0x2')];var MailAccountEvents=new EventEmitter();MailAccountEvents[_0x38bf('0x3')](0x0);var events={'afterCreate':_0x38bf('0x4'),'afterUpdate':_0x38bf('0x5'),'afterDestroy':_0x38bf('0x6')};function emitEvent(_0x364dda){return function(_0xbf6785,_0x47db9b,_0x2e1579){MailAccountEvents[_0x38bf('0x7')](_0x364dda+':'+_0xbf6785['id'],_0xbf6785);MailAccountEvents[_0x38bf('0x7')](_0x364dda,_0xbf6785);_0x2e1579(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailAccount[_0x38bf('0x8')](e,emitEvent(event));}}module['exports']=MailAccountEvents;