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:
@@ -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
|
// nip10 threads must have a root
|
||||||
guard let root else {
|
guard let root else {
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user