1
0
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:
David Baker
2015-07-17 17:48:24 +01:00
parent 7869d7a7df
commit c563380a0b

View File

@@ -734,6 +734,8 @@ MatrixClient.prototype.getAvatarUrlForMember =
var rawUrl = member.events.member.getContent().avatar_url;
if (rawUrl) {
return this._http.getHttpUriForMxc(rawUrl, width, height, resizeMethod);
} else {
return this._http.getIdenticonUri(member.userId, width, height);
}
return null;
};