projects
/
rainny.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abd713d
)
Fix incorrectly parsed mxid (#2452)
author
Ajay Bura
<32841439+ajbura@users.noreply.github.com>
Tue, 19 Aug 2025 12:36:57 +0000
(18:06 +0530)
committer
GitHub
<noreply@github.com>
Tue, 19 Aug 2025 12:36:57 +0000
(22:36 +1000)
src/app/utils/matrix.ts
patch
|
blob
|
history
diff --git
a/src/app/utils/matrix.ts
b/src/app/utils/matrix.ts
index c8b104d987767192f596aa455c78011031062cc1..b4e2e6b8de1c2c61ffb8a296cdf24928e0b01054 100644
(file)
--- a/
src/app/utils/matrix.ts
+++ b/
src/app/utils/matrix.ts
@@
-23,7
+23,7
@@
const DOMAIN_REGEX = /\b(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}\b/;
export const isServerName = (serverName: string): boolean => DOMAIN_REGEX.test(serverName);
-const matchMxId = (id: string): RegExpMatchArray | null => id.match(/^([@$+#])(
.
+):(\S+)$/);
+const matchMxId = (id: string): RegExpMatchArray | null => id.match(/^([@$+#])(
[^\s:]
+):(\S+)$/);
const validMxId = (id: string): boolean => !!matchMxId(id);