1
0
mirror of git://jb55.com/damus synced 2024-09-29 16:30:44 +00:00

nip10: handle invalid reply-with-no-root

I noticed a few clients do this even though its not valid. Let's handle it.

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin 2024-05-09 13:49:06 -07:00
parent 514a053dce
commit a190a5e8fb

View File

@ -48,6 +48,11 @@ struct ThreadReply {
}
}
// reply with no root should be considered reply-to-root
if root == nil && reply != nil {
root = reply
}
// nip10 threads must have a root
guard let root else {
return nil