diff --git a/Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift b/Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift index 35ce1c4c6..66a286151 100644 --- a/Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift +++ b/Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift @@ -91,6 +91,11 @@ class AccountsReaderAPIWindowController: NSWindowController { return } + guard !AccountManager.shared.duplicateServiceAccount(type: accountType, username: usernameTextField.stringValue) else { + self.errorMessageLabel.stringValue = NSLocalizedString("There is already an account of this type with that username created.", comment: "Duplicate Error") + return + } + let apiURL: URL switch accountType { case .freshRSS: