Don't include server in DM links if not needed

This commit is contained in:
N-Pex 2023-10-09 19:10:07 +02:00
parent e6eeb9ede8
commit c04a0a2638
5 changed files with 28 additions and 5 deletions

View file

@ -574,7 +574,7 @@ class Util {
}
sanitizeUserId(userId) {
if (userId && userId.match(/^@.+$/)) {
if (userId && userId.match(/^([0-9a-z-.=_/]+|@[0-9a-z-.=_/]+:.+)$/)) {
return userId;
}
return null;