mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 08:21:47 +00:00
Fix e-tag label in replies to sub-root deprecated-nip-10-style notes
This commit is contained in:
parent
758b0c4091
commit
87c2827fac
@ -1111,9 +1111,19 @@ impl Overlord {
|
||||
// Add an 'e' tag for the note we are replying to
|
||||
add_event_to_tags(&mut tags, parent_id, "reply").await;
|
||||
} else {
|
||||
// We are replying to the root.
|
||||
match parent.replies_to() {
|
||||
None => {
|
||||
// If the parent doesn't have any e-tags, then it is the root
|
||||
// NIP-10: "A direct reply to the root of a thread should have a single marked "e" tag of type "root"."
|
||||
add_event_to_tags(&mut tags, parent_id, "root").await;
|
||||
},
|
||||
Some((_id, _mayberelay)) => {
|
||||
// FIXME: we could try to climb up events until we find the root.
|
||||
|
||||
// We don't know the root. We are a reply.
|
||||
add_event_to_tags(&mut tags, parent_id, "reply").await;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Possibly propagate a subject tag
|
||||
|
Loading…
Reference in New Issue
Block a user