Built motion from commit 52c8a02d.|2.6.29
[motion2.git] / server / api / mailAccount / mailAccount.model.js
index 0279903..a580291 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2ba=['secure','modernAuthentication','CloudProvider','auth','user','pass','./mailAccount.attributes','exports','MailAccount','mail_accounts','provider','custom','service','host','Smtp','port'];(function(_0x39bc4a,_0x595147){var _0x436b0d=function(_0x44e6eb){while(--_0x44e6eb){_0x39bc4a['push'](_0x39bc4a['shift']());}};_0x436b0d(++_0x595147);}(_0xf2ba,0x106));var _0xaf2b=function(_0x6148ee,_0x4d2fca){_0x6148ee=_0x6148ee-0x0;var _0x5afc74=_0xf2ba[_0x6148ee];return _0x5afc74;};'use strict';var attributes=require(_0xaf2b('0x0'));module[_0xaf2b('0x1')]=function(_0x24cce4){return _0x24cce4['define'](_0xaf2b('0x2'),attributes,{'tableName':_0xaf2b('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x52ffa6=this;var _0x60e7d5={'id':_0x52ffa6['id'],'tls':{'rejectUnauthorized':![]}};if(_0x52ffa6[_0xaf2b('0x4')]!==_0xaf2b('0x5')){_0x60e7d5[_0xaf2b('0x6')]=_0x52ffa6[_0xaf2b('0x4')];}else{_0x60e7d5[_0xaf2b('0x7')]=_0x52ffa6[_0xaf2b('0x8')][_0xaf2b('0x7')];_0x60e7d5[_0xaf2b('0x9')]=_0x52ffa6['Smtp'][_0xaf2b('0x9')];_0x60e7d5[_0xaf2b('0xa')]=_0x52ffa6[_0xaf2b('0x8')][_0xaf2b('0xa')];}if(_0x52ffa6[_0xaf2b('0x8')]['authentication']){if(_0x52ffa6[_0xaf2b('0x8')][_0xaf2b('0xb')]){if(!_0x52ffa6['Smtp'][_0xaf2b('0xc')])throw new Error('Cloud\x20Provider\x20configuration\x20not\x20found');_0x60e7d5[_0xaf2b('0xd')]={'type':'OAuth2','user':_0x52ffa6['Smtp'][_0xaf2b('0xe')],'accessToken':_0x52ffa6['Smtp'][_0xaf2b('0xc')]['data5']};}else{_0x60e7d5[_0xaf2b('0xd')]={'user':_0x52ffa6[_0xaf2b('0x8')][_0xaf2b('0xe')],'pass':_0x52ffa6[_0xaf2b('0x8')][_0xaf2b('0xf')]};}}return _0x60e7d5;}}});};
\ No newline at end of file
+var _0x44f9=['auth','OAuth2','user','CloudProvider','data5','pass','./mailAccount.attributes','exports','mail_accounts','provider','service','host','Smtp','port','secure','authentication','modernAuthentication','Cloud\x20Provider\x20configuration\x20not\x20found'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x44f9,0x84));var _0x944f=function(_0xf0bcac,_0x531755){_0xf0bcac=_0xf0bcac-0x0;var _0x4e4c65=_0x44f9[_0xf0bcac];return _0x4e4c65;};'use strict';var attributes=require(_0x944f('0x0'));module[_0x944f('0x1')]=function(_0x2210a2){return _0x2210a2['define']('MailAccount',attributes,{'tableName':_0x944f('0x2'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x327d0b=this;var _0x121704={'id':_0x327d0b['id'],'tls':{'rejectUnauthorized':![]}};if(_0x327d0b[_0x944f('0x3')]!=='custom'){_0x121704[_0x944f('0x4')]=_0x327d0b[_0x944f('0x3')];}else{_0x121704[_0x944f('0x5')]=_0x327d0b[_0x944f('0x6')][_0x944f('0x5')];_0x121704[_0x944f('0x7')]=_0x327d0b[_0x944f('0x6')][_0x944f('0x7')];_0x121704[_0x944f('0x8')]=_0x327d0b[_0x944f('0x6')][_0x944f('0x8')];}if(_0x327d0b['Smtp'][_0x944f('0x9')]){if(_0x327d0b[_0x944f('0x6')][_0x944f('0xa')]){if(!_0x327d0b[_0x944f('0x6')]['CloudProvider'])throw new Error(_0x944f('0xb'));_0x121704[_0x944f('0xc')]={'type':_0x944f('0xd'),'user':_0x327d0b[_0x944f('0x6')][_0x944f('0xe')],'accessToken':_0x327d0b[_0x944f('0x6')][_0x944f('0xf')][_0x944f('0x10')]};}else{_0x121704['auth']={'user':_0x327d0b[_0x944f('0x6')][_0x944f('0xe')],'pass':_0x327d0b['Smtp'][_0x944f('0x11')]};}}return _0x121704;}}});};
\ No newline at end of file