mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-09-13 14:22:25 +03:00
Render room avatar as fallback for dm group chat (#2398)
Some checks failed
Deploy to Netlify (dev) / Deploy to Netlify (push) Has been cancelled
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:
parent
7d4b0dd133
commit
67b05eeb09
1 changed files with 8 additions and 3 deletions
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue