fix invisible names

This commit is contained in:
Shea Duma committed 2026-04-05 05:42:40 +03:00
1 parent 72fcd1ae61
commit a2c6eeb1b7
2 files changed
+10

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
default: patch
---
Fix some zero-width (invisible) names
+5
View File
@@ -529,6 +529,11 @@ export const getMemberDisplayName = (
const member = room.getMember(userId);
const name = member?.rawDisplayName;
if (name === userId) return undefined;
if (
name?.replace(/[\p{Cc}\p{Cf}\u180B-\u180F\uFE00-\uFE0F\uE0100-\uE01EF\u200B-\u200D]/gu, '')
.length === 0
)
return undefined;
return name;
};