mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-12 02:00:28 +03:00
render room avatar for dm group chat
This commit is contained in:
parent
acc7d4ff56
commit
ede68feb12
1 changed files with 5 additions and 0 deletions
|
|
@ -294,6 +294,11 @@ export const getDirectRoomAvatarUrl = (
|
||||||
useAuthentication = false
|
useAuthentication = false
|
||||||
): string | undefined => {
|
): string | undefined => {
|
||||||
const mxcUrl = room.getAvatarFallbackMember()?.getMxcAvatarUrl();
|
const mxcUrl = room.getAvatarFallbackMember()?.getMxcAvatarUrl();
|
||||||
|
|
||||||
|
if (!mxcUrl) {
|
||||||
|
return getRoomAvatarUrl(mx, room, size, useAuthentication);
|
||||||
|
}
|
||||||
|
|
||||||
return mxcUrl
|
return mxcUrl
|
||||||
? mx.mxcUrlToHttp(mxcUrl, size, size, 'crop', undefined, false, useAuthentication) ?? undefined
|
? mx.mxcUrlToHttp(mxcUrl, size, size, 'crop', undefined, false, useAuthentication) ?? undefined
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue