Avoid using deprecated exports, fields, and duplicate code (#12555)
This commit is contained in:
parent
1973197eb6
commit
148a360598
33 changed files with 258 additions and 108 deletions
|
@ -38,7 +38,7 @@ export async function getServerVersionFromFederationApi(client: MatrixClient): P
|
|||
let baseUrl = client.getHomeserverUrl();
|
||||
|
||||
try {
|
||||
const hsName = MatrixClientPeg.getHomeserverName();
|
||||
const hsName = MatrixClientPeg.safeGet().getDomain();
|
||||
// We don't use the js-sdk Autodiscovery module here as it only support client well-known, not server ones.
|
||||
const response = await fetch(`https://${hsName}/.well-known/matrix/server`);
|
||||
const json = await response.json();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue