fix: pronoun pills rendering arbitrarily long pronouns

this could allow bad actors to lag/freeze clients.

Signed-off-by: rooot <[email protected]>
This commit is contained in:
rooot committed 2026-02-26 00:04:57 +01:00
1 parent e10e514449
commit e1576af181
1 file changed
+3 -1
+3 -1
View File
@@ -721,7 +721,9 @@ function useMobileDoubleTap(callback: () => void, delay = 300) {
function PronounTag({ pronouns, tagColor }: { pronouns?: any[]; tagColor: string }) {
if (!pronouns || pronouns.length === 0) return null;
const display = pronouns.slice(0, 2).map((p) => p.summary).join('/');
const clamp = (str: string, len: number) => str.length > len ? `${str.slice(0, len)}...` : str;
const display = clamp(pronouns.slice(0, 2).map((p) => clamp(p.summary, 48)).join('/'), 128);
const hasMore = pronouns.length > 2;
return (