Render room avatar as fallback for dm group chat (#2398)
Some checks failed
Deploy to Netlify (dev) / Deploy to Netlify (push) Has been cancelled

* 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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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