diff --git a/src/app/features/room/message/thread-selector/ThreadSelector.tsx b/src/app/features/room/message/thread-selector/ThreadSelector.tsx
index c78c399c..50c54a58 100644
--- a/src/app/features/room/message/thread-selector/ThreadSelector.tsx
+++ b/src/app/features/room/message/thread-selector/ThreadSelector.tsx
@@ -119,14 +119,22 @@ export function ThreadSelector({
) : (
- Last reply by
- {getMemberName(latestReplyEvent.sender)}
- at
-
+ {/* https://forgejo.ellis.link/continuwuation/continuwuity/issues/2167 */}
+ {latestReplyEvent.sender ? (
+ <>
+ Last reply by
+
+ {getMemberName(latestReplyEvent.sender)}
+ at
+
+ >
+ ) : (
+ View Thread
+ )}
)}
diff --git a/src/app/hooks/useThreadParticipant.ts b/src/app/hooks/useThreadParticipant.ts
index ac205e87..51c88b61 100644
--- a/src/app/hooks/useThreadParticipant.ts
+++ b/src/app/hooks/useThreadParticipant.ts
@@ -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]);