Skip to content

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

Revert "feat(avatars): use initials service for getting images (#2312)"

Leonard Kim698ec1e2d764
diff --git a/react/features/base/participants/functions.js b/react/features/base/participants/functions.js
index 658305bc66..bf0a1fa08e 100644
--- a/react/features/base/participants/functions.js
+++ b/react/features/base/participants/functions.js
@@ -24,12 +24,11 @@ declare var interfaceConfig: Object;
* @returns {string} The URL of the image for the avatar of the specified
* participant.
*/
-export function getAvatarURL({ avatarID, avatarURL, email, id, name }: {
+export function getAvatarURL({ avatarID, avatarURL, email, id }: {
avatarID: string,
avatarURL: string,
email: string,
- id: string,
- name: string
+ id: string
}) {
// If disableThirdPartyRequests disables third-party avatar services, we are
// restricted to a stock image of ours.
@@ -69,8 +68,9 @@ export function getAvatarURL({ avatarID, avatarURL, email, id, name }: {
if (urlPrefix) {
urlSuffix = interfaceConfig.RANDOM_AVATAR_URL_SUFFIX;
} else {
- urlPrefix = 'https://avatar-cdn.jitsi.net/';
- urlSuffix = `/${_getInitials(name) || ' '}/200/avatar.png`;
+ // Otherwise, use a default (meeples, of course).
+ urlPrefix = 'https://abotars.jitsi.net/meeple/';
+ urlSuffix = '';
}
}
@@ -223,26 +223,3 @@ function _getAllParticipants(stateful) {
? stateful
: toState(stateful)['features/base/participants'] || []);
}
-
-/**
- * Gets the initials from a name, assuming a westernized name.
- *
- * @param {string} name - The name from which to parse initials.
- * @private
- * @returns {string}
- */
-function _getInitials(name) {
- if (!name) {
- return '';
- }
-
- const nameParts = name.toUpperCase().split(' ');
- const firstName = nameParts[0];
- let initials = firstName[0];
-
- if (nameParts.length > 1) {
- initials += nameParts[nameParts.length - 1];
- }
-
- return initials;
-}