fix thread crash of continuwuity server bug
This commit is contained in:
parent
7fa5ee9fc6
commit
869de1418a
2 changed files with 18 additions and 10 deletions
|
|
@ -119,14 +119,22 @@ export function ThreadSelector({
|
|||
</Text>
|
||||
) : (
|
||||
<Text size="T200" truncate>
|
||||
<span>Last reply by </span>
|
||||
<b>{getMemberName(latestReplyEvent.sender)}</b>
|
||||
<span> at </span>
|
||||
<Time
|
||||
hour24Clock={hour24Clock}
|
||||
dateFormatString={dateFormatString}
|
||||
ts={latestReplyEvent.origin_server_ts}
|
||||
/>
|
||||
{/* https://forgejo.ellis.link/continuwuation/continuwuity/issues/2167 */}
|
||||
{latestReplyEvent.sender ? (
|
||||
<>
|
||||
<span>Last reply by </span>
|
||||
|
||||
<b>{getMemberName(latestReplyEvent.sender)}</b>
|
||||
<span> at </span>
|
||||
<Time
|
||||
hour24Clock={hour24Clock}
|
||||
dateFormatString={dateFormatString}
|
||||
ts={latestReplyEvent.origin_server_ts}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<span>View Thread</span>
|
||||
)}
|
||||
</Text>
|
||||
)}
|
||||
<Icon size="100" src={Icons.ChevronRight} />
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ export const useThreadParticipants = (timeline: ThreadTimeline): string[] => {
|
|||
u.add(m.sender);
|
||||
});
|
||||
|
||||
if (meta?.latestReplyEvent) {
|
||||
u.add(meta.latestReplyEvent?.sender);
|
||||
if (meta?.latestReplyEvent?.sender) {
|
||||
u.add(meta.latestReplyEvent.sender);
|
||||
}
|
||||
return Array.from(u);
|
||||
}, [meta, messageBatch]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue