Fix user pill deserialisation (#31947)

when containing slashes

This also fixes `m.mentions` calculations on edits

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2026-02-04 14:26:05 +00:00 committed by GitHub
parent bef626a61c
commit 2a1708aa27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,7 +63,7 @@ export default class MatrixToPermalinkConstructor extends PermalinkConstructor {
const entity = parts[0];
if (entity[0] === "@") {
// Probably a user, no further parsing needed.
return PermalinkParts.forUser(entity);
return PermalinkParts.forUser(matches[1]);
} else if (entity[0] === "#" || entity[0] === "!") {
if (parts.length === 1) {
// room without event permalink