fix thread crash of continuwuity server bug

This commit is contained in:
Ajay Bura 2026-08-25 20:47:31 +05:30
commit 869de1418a
2 changed files with 18 additions and 10 deletions

View file

@ -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} />

View file

@ -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]);