You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-18 05:42:00 +03:00
Fall back to the identicon generator if a user doesn't have an avatar_url
This commit is contained in:
@@ -734,6 +734,8 @@ MatrixClient.prototype.getAvatarUrlForMember =
|
|||||||
var rawUrl = member.events.member.getContent().avatar_url;
|
var rawUrl = member.events.member.getContent().avatar_url;
|
||||||
if (rawUrl) {
|
if (rawUrl) {
|
||||||
return this._http.getHttpUriForMxc(rawUrl, width, height, resizeMethod);
|
return this._http.getHttpUriForMxc(rawUrl, width, height, resizeMethod);
|
||||||
|
} else {
|
||||||
|
return this._http.getIdenticonUri(member.userId, width, height);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user