Skip to content

Commit 6a36f5d

Browse files
committed
fix: resolve string | undefined type error for thread event_id
1 parent df8e5e0 commit 6a36f5d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/app/features/room/RoomInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ const getReplyContent = (replyDraft: IReplyDraft | undefined, room?: Room): IEve
209209
} else {
210210
// Regular thread message — per spec, include fallback m.in_reply_to pointing to the
211211
// most recent thread message so unthreaded clients can display it as a reply chain
212-
const threadRootId = replyDraft.relation.event_id;
212+
const threadRootId = replyDraft.relation.event_id ?? replyDraft.eventId;
213213
const latestEventId = room ? getLatestThreadEventId(room, threadRootId) : threadRootId;
214214
relatesTo['m.in_reply_to'] = {
215215
event_id: latestEventId,

0 commit comments

Comments
 (0)