mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-21 17:41:25 -08:00
fix rooms with empty localparts
This commit is contained in:
1 parent
799f939cfa
commit
db08d7d4e9
2 files changed
+6
-1
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
default: patch
|
||||
---
|
||||
|
||||
Allow rooms with empty local parts to be viewed.
|
||||
@@ -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];
|
||||
Reference in new issue
Block a user