From 869de1418a41107e2746a245ef9cc03e7204d091 Mon Sep 17 00:00:00 2001
From: Ajay Bura <32841439+ajbura@users.noreply.github.com>
Date: Tue, 25 Aug 2026 20:47:31 +0530
Subject: [PATCH] fix thread crash of continuwuity server bug
---
.../thread-selector/ThreadSelector.tsx | 24 ++++++++++++-------
src/app/hooks/useThreadParticipant.ts | 4 ++--
2 files changed, 18 insertions(+), 10 deletions(-)
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]);