Lowercase room alias before joining

This commit is contained in:
David Baker
2023-01-19 19:20:42 +00:00
parent 9437a00997
commit 524f530dce
2 changed files with 11 additions and 1 deletions

View File

@@ -211,6 +211,12 @@ export function fullAliasFromRoomName(
return `#${roomAliasLocalpartFromRoomName(roomName)}:${client.getDomain()}`;
}
/**
* XXX What is this trying to do? It looks like it's getting the localpart from
* a room alias, but why is it splitting on hyphens and then putting spaces in??
* @param roomId
* @returns
*/
export function roomNameFromRoomId(roomId: string): string {
return roomId
.match(/([^:]+):.*$/)[1]