From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Tue, 19 Aug 2025 12:36:57 +0000 (+0530) Subject: Fix incorrectly parsed mxid (#2452) X-Git-Tag: v4.10.0~13 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=789da641c1209c866388b8e06c012daad72106b6;p=rainny.git Fix incorrectly parsed mxid (#2452) --- diff --git a/src/app/utils/matrix.ts b/src/app/utils/matrix.ts index c8b104d..b4e2e6b 100644 --- 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);