Render room avatar as fallback for dm group chat (#2398)

* render room avatar for dm group chat

* remove extra conditions
This commit is contained in:
Ajay Bura
2025-07-23 21:00:02 +05:30
committed by GitHub
parent 7d4b0dd133
commit 67b05eeb09

View File

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