From 6a36f5dc1c36cc2f46b96bd967747d837a4fc581 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Sun, 15 Mar 2026 14:03:34 -0400 Subject: [PATCH] fix: resolve string | undefined type error for thread event_id --- src/app/features/room/RoomInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/features/room/RoomInput.tsx b/src/app/features/room/RoomInput.tsx index bde6a2de..1b0e6f5f 100644 --- a/src/app/features/room/RoomInput.tsx +++ b/src/app/features/room/RoomInput.tsx @@ -209,7 +209,7 @@ const getReplyContent = (replyDraft: IReplyDraft | undefined, room?: Room): IEve } else { // Regular thread message — per spec, include fallback m.in_reply_to pointing to the // most recent thread message so unthreaded clients can display it as a reply chain - const threadRootId = replyDraft.relation.event_id; + const threadRootId = replyDraft.relation.event_id ?? replyDraft.eventId; const latestEventId = room ? getLatestThreadEventId(room, threadRootId) : threadRootId; relatesTo['m.in_reply_to'] = { event_id: latestEventId,