Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(avatar): add ZWNJ between initials of letter avatars

Shahab6085220bfcad
diff --git a/react/features/base/avatar/functions.js b/react/features/base/avatar/functions.js
index 9c40995898..68677a6675 100644
--- a/react/features/base/avatar/functions.js
+++ b/react/features/base/avatar/functions.js
@@ -68,7 +68,9 @@ export function getInitials(s: ?string) {
const initialsBasis = _.split(s, '@')[0];
const [ firstWord, secondWord ] = initialsBasis.split(wordSplitRegex).filter(Boolean);
- return getFirstGraphemeUpper(firstWord) + getFirstGraphemeUpper(secondWord);
+ // Add ZWNJ to separate the initials in languages like Arabic or Persian.
+ return `${getFirstGraphemeUpper(firstWord)}\u200c${getFirstGraphemeUpper(secondWord)}`;
+
}
/**