Use appropriate Member object when rendering thread summary (#8204)
This commit is contained in:
parent
215f89d76a
commit
3b388b7fae
1 changed files with 2 additions and 3 deletions
|
@ -90,17 +90,16 @@ export const ThreadMessagePreview = ({ thread, showDisplayname = false }: IPrevi
|
||||||
}, [lastReply, replacingEventId]);
|
}, [lastReply, replacingEventId]);
|
||||||
if (!preview) return null;
|
if (!preview) return null;
|
||||||
|
|
||||||
const sender = thread.roomState.getSentinelMember(lastReply.getSender());
|
|
||||||
return <>
|
return <>
|
||||||
<MemberAvatar
|
<MemberAvatar
|
||||||
member={sender}
|
member={lastReply.sender}
|
||||||
fallbackUserId={lastReply.getSender()}
|
fallbackUserId={lastReply.getSender()}
|
||||||
width={24}
|
width={24}
|
||||||
height={24}
|
height={24}
|
||||||
className="mx_ThreadInfo_avatar"
|
className="mx_ThreadInfo_avatar"
|
||||||
/>
|
/>
|
||||||
{ showDisplayname && <div className="mx_ThreadInfo_sender">
|
{ showDisplayname && <div className="mx_ThreadInfo_sender">
|
||||||
{ sender?.name ?? lastReply.getSender() }
|
{ lastReply.sender?.name ?? lastReply.getSender() }
|
||||||
</div> }
|
</div> }
|
||||||
<div className="mx_ThreadInfo_content">
|
<div className="mx_ThreadInfo_content">
|
||||||
<span className="mx_ThreadInfo_message-preview">
|
<span className="mx_ThreadInfo_message-preview">
|
||||||
|
|
Loading…
Reference in a new issue