Built motion from commit 1fa89557.|2.6.10
[motion2.git] / server / api / mailAccount / mailAccount.model.js
index 9e99f91..87e4ab6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xff3d=['modernAuthentication','CloudProvider','user','auth','pass','./mailAccount.attributes','define','MailAccount','mail_accounts','provider','service','port','Smtp','secure','authentication'];(function(_0x547648,_0x7cb734){var _0x2b59bf=function(_0x100193){while(--_0x100193){_0x547648['push'](_0x547648['shift']());}};_0x2b59bf(++_0x7cb734);}(_0xff3d,0x122));var _0xdff3=function(_0x5305e6,_0x12781f){_0x5305e6=_0x5305e6-0x0;var _0x30c6f2=_0xff3d[_0x5305e6];return _0x30c6f2;};'use strict';var attributes=require(_0xdff3('0x0'));module['exports']=function(_0x18490b){return _0x18490b[_0xdff3('0x1')](_0xdff3('0x2'),attributes,{'tableName':_0xdff3('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x2fab86=this;var _0x52ea65={'id':_0x2fab86['id'],'tls':{'rejectUnauthorized':![]}};if(_0x2fab86[_0xdff3('0x4')]!=='custom'){_0x52ea65[_0xdff3('0x5')]=_0x2fab86[_0xdff3('0x4')];}else{_0x52ea65['host']=_0x2fab86['Smtp']['host'];_0x52ea65[_0xdff3('0x6')]=_0x2fab86[_0xdff3('0x7')]['port'];_0x52ea65[_0xdff3('0x8')]=_0x2fab86['Smtp']['secure'];}if(_0x2fab86['Smtp'][_0xdff3('0x9')]){if(_0x2fab86['Smtp'][_0xdff3('0xa')]){if(!_0x2fab86[_0xdff3('0x7')][_0xdff3('0xb')])throw new Error('Cloud\x20Provider\x20configuration\x20not\x20found');_0x52ea65['auth']={'type':'OAuth2','user':_0x2fab86['Smtp'][_0xdff3('0xc')],'accessToken':_0x2fab86[_0xdff3('0x7')][_0xdff3('0xb')]['data5']};}else{_0x52ea65[_0xdff3('0xd')]={'user':_0x2fab86[_0xdff3('0x7')]['user'],'pass':_0x2fab86[_0xdff3('0x7')][_0xdff3('0xe')]};}}return _0x52ea65;}}});};
\ No newline at end of file
+var _0x5199=['host','port','Smtp','secure','authentication','CloudProvider','Cloud\x20Provider\x20configuration\x20not\x20found','auth','OAuth2','user','./mailAccount.attributes','mail_accounts','custom','provider'];(function(_0x169f6c,_0x28ca7b){var _0x39247f=function(_0x22a9ee){while(--_0x22a9ee){_0x169f6c['push'](_0x169f6c['shift']());}};_0x39247f(++_0x28ca7b);}(_0x5199,0x1e6));var _0x9519=function(_0x487b0c,_0x14ff74){_0x487b0c=_0x487b0c-0x0;var _0x1adbdc=_0x5199[_0x487b0c];return _0x1adbdc;};'use strict';var attributes=require(_0x9519('0x0'));module['exports']=function(_0x2afc06){return _0x2afc06['define']('MailAccount',attributes,{'tableName':_0x9519('0x1'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x591f73=this;var _0x2afd5c={'id':_0x591f73['id'],'tls':{'rejectUnauthorized':![]}};if(_0x591f73['provider']!==_0x9519('0x2')){_0x2afd5c['service']=_0x591f73[_0x9519('0x3')];}else{_0x2afd5c[_0x9519('0x4')]=_0x591f73['Smtp'][_0x9519('0x4')];_0x2afd5c[_0x9519('0x5')]=_0x591f73[_0x9519('0x6')][_0x9519('0x5')];_0x2afd5c[_0x9519('0x7')]=_0x591f73['Smtp'][_0x9519('0x7')];}if(_0x591f73[_0x9519('0x6')][_0x9519('0x8')]){if(_0x591f73['Smtp']['modernAuthentication']){if(!_0x591f73[_0x9519('0x6')][_0x9519('0x9')])throw new Error(_0x9519('0xa'));_0x2afd5c[_0x9519('0xb')]={'type':_0x9519('0xc'),'user':_0x591f73[_0x9519('0x6')][_0x9519('0xd')],'accessToken':_0x591f73['Smtp']['CloudProvider']['data5']};}else{_0x2afd5c[_0x9519('0xb')]={'user':_0x591f73[_0x9519('0x6')][_0x9519('0xd')],'pass':_0x591f73[_0x9519('0x6')]['pass']};}}return _0x2afd5c;}}});};
\ No newline at end of file