mirror of
git://jb55.com/damus
synced 2024-09-30 00:40:45 +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:
parent
514a053dce
commit
a190a5e8fb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user