Built motion from commit d1eab355.|2.6.28
[motion2.git] / server / api / mailAccount / mailAccount.model.js
index 7afbd7c..ef243d8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe241=['data5','./mailAccount.attributes','define','mail_accounts','provider','service','Smtp','host','port','secure','authentication','Cloud\x20Provider\x20configuration\x20not\x20found','auth','OAuth2','user'];(function(_0xdb344f,_0xd0f413){var _0x1addba=function(_0x4a0ad0){while(--_0x4a0ad0){_0xdb344f['push'](_0xdb344f['shift']());}};_0x1addba(++_0xd0f413);}(_0xe241,0x169));var _0x1e24=function(_0x2aecb2,_0x343312){_0x2aecb2=_0x2aecb2-0x0;var _0x3ebb80=_0xe241[_0x2aecb2];return _0x3ebb80;};'use strict';var attributes=require(_0x1e24('0x0'));module['exports']=function(_0x367d92){return _0x367d92[_0x1e24('0x1')]('MailAccount',attributes,{'tableName':_0x1e24('0x2'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x22fff5=this;var _0x4df7f8={'id':_0x22fff5['id'],'tls':{'rejectUnauthorized':![]}};if(_0x22fff5[_0x1e24('0x3')]!=='custom'){_0x4df7f8[_0x1e24('0x4')]=_0x22fff5[_0x1e24('0x3')];}else{_0x4df7f8['host']=_0x22fff5[_0x1e24('0x5')][_0x1e24('0x6')];_0x4df7f8['port']=_0x22fff5[_0x1e24('0x5')][_0x1e24('0x7')];_0x4df7f8[_0x1e24('0x8')]=_0x22fff5[_0x1e24('0x5')][_0x1e24('0x8')];}if(_0x22fff5[_0x1e24('0x5')][_0x1e24('0x9')]){if(_0x22fff5['Smtp']['modernAuthentication']){if(!_0x22fff5[_0x1e24('0x5')]['CloudProvider'])throw new Error(_0x1e24('0xa'));_0x4df7f8[_0x1e24('0xb')]={'type':_0x1e24('0xc'),'user':_0x22fff5[_0x1e24('0x5')][_0x1e24('0xd')],'accessToken':_0x22fff5[_0x1e24('0x5')]['CloudProvider'][_0x1e24('0xe')]};}else{_0x4df7f8[_0x1e24('0xb')]={'user':_0x22fff5[_0x1e24('0x5')][_0x1e24('0xd')],'pass':_0x22fff5[_0x1e24('0x5')]['pass']};}}return _0x4df7f8;}}});};
\ No newline at end of file
+var _0xca93=['service','host','Smtp','port','secure','authentication','modernAuthentication','CloudProvider','OAuth2','user','data5','pass','exports','MailAccount','mail_accounts','provider','custom'];(function(_0x533e4e,_0x4eba54){var _0x1f14bb=function(_0x33a485){while(--_0x33a485){_0x533e4e['push'](_0x533e4e['shift']());}};_0x1f14bb(++_0x4eba54);}(_0xca93,0x72));var _0x3ca9=function(_0x43d11d,_0xccff91){_0x43d11d=_0x43d11d-0x0;var _0x38cd08=_0xca93[_0x43d11d];return _0x38cd08;};'use strict';var attributes=require('./mailAccount.attributes');module[_0x3ca9('0x0')]=function(_0x3c289b){return _0x3c289b['define'](_0x3ca9('0x1'),attributes,{'tableName':_0x3ca9('0x2'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x2425e9=this;var _0x3c61ef={'id':_0x2425e9['id'],'tls':{'rejectUnauthorized':![]}};if(_0x2425e9[_0x3ca9('0x3')]!==_0x3ca9('0x4')){_0x3c61ef[_0x3ca9('0x5')]=_0x2425e9['provider'];}else{_0x3c61ef[_0x3ca9('0x6')]=_0x2425e9[_0x3ca9('0x7')]['host'];_0x3c61ef[_0x3ca9('0x8')]=_0x2425e9[_0x3ca9('0x7')][_0x3ca9('0x8')];_0x3c61ef[_0x3ca9('0x9')]=_0x2425e9[_0x3ca9('0x7')][_0x3ca9('0x9')];}if(_0x2425e9[_0x3ca9('0x7')][_0x3ca9('0xa')]){if(_0x2425e9['Smtp'][_0x3ca9('0xb')]){if(!_0x2425e9[_0x3ca9('0x7')][_0x3ca9('0xc')])throw new Error('Cloud\x20Provider\x20configuration\x20not\x20found');_0x3c61ef['auth']={'type':_0x3ca9('0xd'),'user':_0x2425e9[_0x3ca9('0x7')][_0x3ca9('0xe')],'accessToken':_0x2425e9[_0x3ca9('0x7')][_0x3ca9('0xc')][_0x3ca9('0xf')]};}else{_0x3c61ef['auth']={'user':_0x2425e9['Smtp'][_0x3ca9('0xe')],'pass':_0x2425e9[_0x3ca9('0x7')][_0x3ca9('0x10')]};}}return _0x3c61ef;}}});};
\ No newline at end of file