Built motion from commit e8da49ee.|2.6.33
[motion2.git] / server / api / mailAccount / mailAccount.model.js
index aee2f99..b3e1520 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb4ef=['OAuth2','user','./mailAccount.attributes','exports','define','mail_accounts','provider','service','host','Smtp','port','secure','authentication','modernAuthentication','CloudProvider','Cloud\x20Provider\x20configuration\x20not\x20found'];(function(_0x5188fb,_0x4f2f72){var _0x538115=function(_0x230502){while(--_0x230502){_0x5188fb['push'](_0x5188fb['shift']());}};_0x538115(++_0x4f2f72);}(_0xb4ef,0x1a2));var _0xfb4e=function(_0x366799,_0x5c5e0e){_0x366799=_0x366799-0x0;var _0x3cd74d=_0xb4ef[_0x366799];return _0x3cd74d;};'use strict';var attributes=require(_0xfb4e('0x0'));module[_0xfb4e('0x1')]=function(_0xcd2b79){return _0xcd2b79[_0xfb4e('0x2')]('MailAccount',attributes,{'tableName':_0xfb4e('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x384832=this;var _0x1291b7={'id':_0x384832['id'],'tls':{'rejectUnauthorized':![]}};if(_0x384832[_0xfb4e('0x4')]!=='custom'){_0x1291b7[_0xfb4e('0x5')]=_0x384832[_0xfb4e('0x4')];}else{_0x1291b7[_0xfb4e('0x6')]=_0x384832[_0xfb4e('0x7')]['host'];_0x1291b7[_0xfb4e('0x8')]=_0x384832[_0xfb4e('0x7')]['port'];_0x1291b7[_0xfb4e('0x9')]=_0x384832[_0xfb4e('0x7')][_0xfb4e('0x9')];}if(_0x384832['Smtp'][_0xfb4e('0xa')]){if(_0x384832[_0xfb4e('0x7')][_0xfb4e('0xb')]){if(!_0x384832[_0xfb4e('0x7')][_0xfb4e('0xc')])throw new Error(_0xfb4e('0xd'));_0x1291b7['auth']={'type':_0xfb4e('0xe'),'user':_0x384832[_0xfb4e('0x7')][_0xfb4e('0xf')],'accessToken':_0x384832[_0xfb4e('0x7')][_0xfb4e('0xc')]['data5']};}else{_0x1291b7['auth']={'user':_0x384832['Smtp']['user'],'pass':_0x384832['Smtp']['pass']};}}return _0x1291b7;}}});};
\ No newline at end of file
+var _0xbeb2=['MailAccount','mail_accounts','custom','service','provider','Smtp','host','port','secure','authentication','modernAuthentication','CloudProvider','OAuth2','user','auth','exports','define'];(function(_0x5b684,_0x22db3c){var _0x1fa9b7=function(_0x2e76f4){while(--_0x2e76f4){_0x5b684['push'](_0x5b684['shift']());}};_0x1fa9b7(++_0x22db3c);}(_0xbeb2,0x75));var _0x2beb=function(_0x1aacb2,_0x4dba34){_0x1aacb2=_0x1aacb2-0x0;var _0x3a6459=_0xbeb2[_0x1aacb2];return _0x3a6459;};'use strict';var attributes=require('./mailAccount.attributes');module[_0x2beb('0x0')]=function(_0xcc612d){return _0xcc612d[_0x2beb('0x1')](_0x2beb('0x2'),attributes,{'tableName':_0x2beb('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x25292d=this;var _0x2e5b9c={'id':_0x25292d['id'],'tls':{'rejectUnauthorized':![]}};if(_0x25292d['provider']!==_0x2beb('0x4')){_0x2e5b9c[_0x2beb('0x5')]=_0x25292d[_0x2beb('0x6')];}else{_0x2e5b9c['host']=_0x25292d[_0x2beb('0x7')][_0x2beb('0x8')];_0x2e5b9c[_0x2beb('0x9')]=_0x25292d['Smtp'][_0x2beb('0x9')];_0x2e5b9c[_0x2beb('0xa')]=_0x25292d['Smtp'][_0x2beb('0xa')];}if(_0x25292d[_0x2beb('0x7')][_0x2beb('0xb')]){if(_0x25292d[_0x2beb('0x7')][_0x2beb('0xc')]){if(!_0x25292d[_0x2beb('0x7')][_0x2beb('0xd')])throw new Error('Cloud\x20Provider\x20configuration\x20not\x20found');_0x2e5b9c['auth']={'type':_0x2beb('0xe'),'user':_0x25292d['Smtp'][_0x2beb('0xf')],'accessToken':_0x25292d['Smtp']['CloudProvider']['data5']};}else{_0x2e5b9c[_0x2beb('0x10')]={'user':_0x25292d[_0x2beb('0x7')][_0x2beb('0xf')],'pass':_0x25292d[_0x2beb('0x7')]['pass']};}}return _0x2e5b9c;}}});};
\ No newline at end of file