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];