Use appropriate Member object when rendering thread summary (#8204)

This commit is contained in:
Michael Telatynski 2022-03-31 14:43:29 +01:00 committed by GitHub
parent 215f89d76a
commit 3b388b7fae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,17 +90,16 @@ export const ThreadMessagePreview = ({ thread, showDisplayname = false }: IPrevi
}, [lastReply, replacingEventId]);
if (!preview) return null;
const sender = thread.roomState.getSentinelMember(lastReply.getSender());
return <>
<MemberAvatar
member={sender}
member={lastReply.sender}
fallbackUserId={lastReply.getSender()}
width={24}
height={24}
className="mx_ThreadInfo_avatar"
/>
{ showDisplayname && <div className="mx_ThreadInfo_sender">
{ sender?.name ?? lastReply.getSender() }
{ lastReply.sender?.name ?? lastReply.getSender() }
</div> }
<div className="mx_ThreadInfo_content">
<span className="mx_ThreadInfo_message-preview">