forked from zulip/zulip-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR removes .ogg file check (supported only by very old servers). Other enhancements in server validation logic - * Reject domains with no organizations. * Convert validation methods to async await * Add messages.js for returning error message strings. Fixes: zulip#596, zulip#573.
- Loading branch information
Showing
2 changed files
with
90 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class Messages { | ||
invalidZulipServerError(domain) { | ||
return `${domain} does not appear to be a valid Zulip server. Make sure that | ||
\n • You can connect to that URL in a web browser.\ | ||
\n • If you need a proxy to connect to the Internet, that you've configured your proxy in the Network settings.\ | ||
\n • It's a Zulip server. (The oldest supported version is 1.6).\ | ||
\n • The server has a valid certificate. (You can add custom certificates in Settings > Organizations).`; | ||
} | ||
|
||
noOrgsError(domain) { | ||
return `${domain} does not have any organizations added.\ | ||
\nPlease contact your server administrator.`; | ||
} | ||
|
||
certErrorMessage(domain, error) { | ||
return `Do you trust certificate from ${domain}? \n ${error}`; | ||
} | ||
|
||
certErrorDetail() { | ||
return `The organization you're connecting to is either someone impersonating the Zulip server you entered, or the server you're trying to connect to is configured in an insecure way. | ||
\nIf you have a valid certificate please add it from Settings>Organizations and try to add the organization again. | ||
\nUnless you have a good reason to believe otherwise, you should not proceed. | ||
\nYou can click here if you'd like to proceed with the connection.`; | ||
} | ||
} | ||
|
||
module.exports = new Messages(); |