Merge pull request #5762 from timokoesters/fix-servername-parsing

fix: make room directory correct when using a homeserver with explicit port
pull/21833/head
Michael Telatynski 2021-03-16 10:12:58 +00:00 committed by GitHub
commit 4ae6c2f808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -261,7 +261,7 @@ class _MatrixClientPeg implements IMatrixClientPeg {
}
public getHomeserverName(): string {
const matches = /^@.+:(.+)$/.exec(this.matrixClient.credentials.userId);
const matches = /^@[^:]+:(.+)$/.exec(this.matrixClient.credentials.userId);
if (matches === null || matches.length < 1) {
throw new Error("Failed to derive homeserver name from user ID!");
}