fix invisible names
This commit is contained in:
1 parent
72fcd1ae61
commit
a2c6eeb1b7
2 files changed
+10
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
default: patch
|
||||
---
|
||||
|
||||
Fix some zero-width (invisible) names
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user