From db08d7d4e9991e834ee6106e68220e337874817c Mon Sep 17 00:00:00 2001 From: 7w1 Date: Sat, 11 Jul 2026 18:21:10 -0500 Subject: [PATCH] fix rooms with empty localparts --- .changeset/fix-empty-localparts.md | 5 +++++ src/app/utils/mxIdHelper.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/fix-empty-localparts.md diff --git a/.changeset/fix-empty-localparts.md b/.changeset/fix-empty-localparts.md new file mode 100644 index 000000000..b02637def --- /dev/null +++ b/.changeset/fix-empty-localparts.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Allow rooms with empty local parts to be viewed. diff --git a/src/app/utils/mxIdHelper.ts b/src/app/utils/mxIdHelper.ts index 91414b8aa..fdf68957b 100644 --- a/src/app/utils/mxIdHelper.ts +++ b/src/app/utils/mxIdHelper.ts @@ -1,4 +1,4 @@ export const matchMxId = (id: string): RegExpMatchArray | null => - id.match(/^([@$+#])([^\s:]+):(\S+)$/); + id.match(/^([@$+#])([^\s:]*):(\S+)$/); export const validMxId = (id: string): boolean => !!matchMxId(id); export const getMxIdServer = (userId: string): string | undefined => matchMxId(userId)?.[3];