Check for Matrix v1.11 in setup
This commit is contained in:
parent
f35c5266b6
commit
6a15f4fc0f
1 changed files with 3 additions and 0 deletions
|
@ -87,6 +87,9 @@ async function validateHomeserverOrigin(serverUrlPrompt, url) {
|
||||||
if (res.status !== 200) return `There is no Matrix server at that URL (${url}/_matrix/client/versions returned ${res.status})`
|
if (res.status !== 200) return `There is no Matrix server at that URL (${url}/_matrix/client/versions returned ${res.status})`
|
||||||
try {
|
try {
|
||||||
var json = await res.json()
|
var json = await res.json()
|
||||||
|
if (!Array.isArray(json?.versions) || !json.versions.includes("v1.11")) {
|
||||||
|
return `OOYE needs Matrix version v1.11, but ${url} doesn't support this`
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return `There is no Matrix server at that URL (${url}/_matrix/client/versions is not JSON)`
|
return `There is no Matrix server at that URL (${url}/_matrix/client/versions is not JSON)`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue