Blob Blame History Raw
--- comm/mailnews/base/prefs/content/AccountWizard.js.orig	2021-07-22 22:59:43.524186392 +0300
+++ comm/mailnews/base/prefs/content/AccountWizard.js	2021-07-22 23:00:49.472758575 +0300
@@ -178,6 +178,8 @@ function FinishAccount()
     // we might be simply finishing another account
     if (!gCurrentAccount)
       gCurrentAccount = createAccount(accountData);
+    else
+      gCurrentAccount.incomingServer.valid = true;
 
     // transfer all attributes from the accountdata
     finishAccount(gCurrentAccount, accountData);
@@ -708,7 +710,8 @@ function setDefaultCopiesAndFoldersPrefs
 
 function AccountExists(userName, hostName, serverType)
 {
-  return MailServices.accounts.findRealServer(userName, hostName, serverType, 0);
+  let server = MailServices.accounts.findRealServer(userName, hostName, serverType, 0);
+  return server && server.valid != false;
 }
 
 function getFirstInvalidAccount()
--- comm/mailnews/base/prefs/content/amUtils.js.orig	2021-07-22 23:00:30.896879074 +0300
+++ comm/mailnews/base/prefs/content/amUtils.js	2021-07-22 23:00:36.468842951 +0300
@@ -198,6 +198,7 @@ function accountNameExists(aAccountName,
                                   Ci.nsIMsgAccount))
   {
     if (account.key != aAccountKey && account.incomingServer &&
+        account.incomingServer.valid != false &&
         aAccountName == account.incomingServer.prettyName) {
       return true;
     }
--- comm/mailnews/news/src/nsNntpService.cpp.orig       2020-02-18 02:36:20.000000000 +0300
+++ comm/mailnews/news/src/nsNntpService.cpp    2021-07-19 03:48:05.804759761 +0300
@@ -948,9 +948,12 @@ nsNntpService::CreateNewsAccount(const c
   rv = identity->SetComposeHtml(false);
   NS_ENSURE_SUCCESS(rv,rv);

-  // the identity isn't filled in, so it is not valid.
-  rv = (*aServer)->SetValid(false);
-  if (NS_FAILED(rv)) return rv;
+  // Use fake data for now (user can change it in AccountWizard whenever want)
+  rv = identity->SetEmail(NS_LITERAL_CSTRING("user@domain.invalid"));
+  NS_ENSURE_SUCCESS(rv,rv);
+
+  rv = identity->SetFullName(NS_LITERAL_STRING(""));
+  NS_ENSURE_SUCCESS(rv,rv);

   // hook them together
   rv = account->SetIncomingServer(*aServer);