fix: a person mentioned in a channel without a name shows a raw id

When an app mentions a person in a channel message by account id only, without a display name, the channel showed raw text like "@U:" followed by a long id. It now shows the person's name, or "Unknown" when the account no longer exists, the same way mentions that carry a name already worked. Mentions that carry a custom name keep showing it.

Fixes #32362
This commit is contained in:
Classic298 2026-10-13 21:22:10 +02:00
parent 5032e834ea
commit 9d73ed5679

View file

@ -107,7 +107,10 @@
browser &&
idType === 'U' &&
requestedUserId !== id &&
(!token?.label || token.label === id || /^[0-9a-f]{8}-[0-9a-f-]{27}$/i.test(token.label))
(!token?.label ||
token.label === _id ||
token.label === id ||
/^[0-9a-f]{8}-[0-9a-f-]{27}$/i.test(token.label))
) {
requestedUserId = id;
resolvedUser = null;