fix rooms with empty localparts

This commit is contained in:
7w1 committed 2026-07-11 18:21:10 -05:00
1 parent 799f939cfa
commit db08d7d4e9
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
default: patch
---
Allow rooms with empty local parts to be viewed.
+1 -1
View File
@@ -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];