render room avatar for dm group chat

This commit is contained in:
Ajay Bura 2025-07-19 14:43:39 +05:30
parent acc7d4ff56
commit ede68feb12

View file

@ -294,6 +294,11 @@ export const getDirectRoomAvatarUrl = (
useAuthentication = false
): string | undefined => {
const mxcUrl = room.getAvatarFallbackMember()?.getMxcAvatarUrl();
if (!mxcUrl) {
return getRoomAvatarUrl(mx, room, size, useAuthentication);
}
return mxcUrl
? mx.mxcUrlToHttp(mxcUrl, size, size, 'crop', undefined, false, useAuthentication) ?? undefined
: undefined;