write Identity Server out in full to be less confusing

Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
This commit is contained in:
David Baker 2019-08-13 10:48:56 +01:00 committed by GitHub
parent c732ae3aa9
commit 934b711936
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,7 +61,7 @@ function unabbreviateUrl(u) {
* @param {string} isUrl The url to check
* @returns {string} null if url passes all checks, otherwise i18ned error string
*/
async function checkIsUrl(isUrl) {
async function checkIdentityServerUrl(url) {
const parsedUrl = url.parse(isUrl);
if (parsedUrl.protocol !== 'https:') return _t("Identity Server URL must be HTTPS");
@ -75,9 +75,9 @@ async function checkIsUrl(isUrl) {
{ method: "GET", url: isUrl + '/_matrix/identity/api/v1' },
(err, response, body) => {
if (err) {
resolve(_t("Could not connect to ID Server"));
resolve(_t("Could not connect to Identity Server"));
} else if (response.status < 200 || response.status >= 300) {
resolve(_t("Not a valid ID Server (status code %(code)s)", {code: response.status}));
resolve(_t("Not a valid Identity Server (status code %(code)s)", {code: response.status}));
} else {
resolve(null);
}