Support E.164-based Matrix IDs (MSC4009)

This commit is contained in:
Aine 2024-12-11 18:24:08 +02:00
parent 402457640c
commit 4fd18007de
No known key found for this signature in database
GPG Key ID: 34969C908CCA2804
2 changed files with 1 additions and 2 deletions

View File

@ -189,7 +189,7 @@ export const UserList = (props: ListProps) => (
// here only local part of user_id
// maxLength = 255 - "@" - ":" - storage.getItem("home_server").length
// storage.getItem("home_server").length is not valid here
const validateUser = [required(), maxLength(253), regex(/^[a-z0-9._=\-/]+$/, "synapseadmin.users.invalid_user_id")];
const validateUser = [required(), maxLength(253), regex(/^[a-z0-9._=\-\+/]+$/, "synapseadmin.users.invalid_user_id")];
const validateAddress = [required(), maxLength(255)];

View File

@ -41,7 +41,6 @@ export function returnMXID(input: string | Identifier): string {
const homeserver = localStorage.getItem("home_server");
// Check if the input already looks like a valid MXID (i.e., starts with "@" and contains ":")
const mxidPattern = /^@[^@:]+:[^@:]+$/;
if (isMXID(input)) {
return input as string; // Already a valid MXID
}