fix: use reply as root if root is undefined

This commit is contained in:
Shusui MOYATANI
2023-06-10 02:56:56 +09:00
parent 9d6eb2089c
commit 02a382aa8f

View File

@@ -225,7 +225,7 @@ const NotePostForm: Component<NotePostFormProps> = (props) => {
...notifyPubkeys(), ...notifyPubkeys(),
...pubkeyReferences, // 本文中の公開鍵npub) ...pubkeyReferences, // 本文中の公開鍵npub)
]), ]),
rootEventId: replyTo()?.rootEvent()?.id, rootEventId: replyTo()?.rootEvent()?.id ?? replyTo()?.replyingToEvent()?.id,
replyEventId: replyTo()?.id, replyEventId: replyTo()?.id,
}; };
} }