Room version 12 and room upgrades

This commit is contained in:
Cadence Ember
2026-01-07 02:43:20 +13:00
parent 092a4cf7b0
commit 55e0e5dfa1
27 changed files with 666 additions and 483 deletions
+7 -2
View File
@@ -72,8 +72,13 @@ async function mreq(method, url, bodyIn, extra = {}) {
}, extra)
const res = await fetch(baseUrl + url, opts)
/** @type {any} */
const root = await res.json()
const text = await res.text()
try {
/** @type {any} */
var root = JSON.parse(text)
} catch (e) {
throw new MatrixServerError(text, {baseUrl, url, ...opts})
}
if (!res.ok || root.errcode) {
delete opts.headers?.["Authorization"]