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:
@@ -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 => {
|
||||||
|
|||||||
Reference in New Issue
Block a user