publish: reference the parent comment with an e tag when commenting under an external-content (I) thread, instead of pointing at the root i again.

This commit is contained in:
Yasuhiro Matsumoto
2026-07-15 10:24:18 +09:00
parent 198cbc6d4a
commit 4f798759dd
-8
View File
@@ -280,13 +280,6 @@ func buildNIP22Tags(evt *nostr.Event, target *nostr.Event, relayHints []string)
}
// parent tags (lowercase) - always reference the target event
if rootScopeName == "I" {
iTag := nostr.Tag{"i", rootScopeValue}
if rootScopeRelay != "" {
iTag = append(iTag, rootScopeRelay)
}
evt.Tags = append(evt.Tags, iTag)
} else {
if target.Kind.IsAddressable() || target.Kind.IsReplaceable() {
aValue := fmt.Sprintf("%d:%s:%s", target.Kind, target.PubKey.Hex(), dtag())
aTag := nostr.Tag{"a", aValue}
@@ -303,7 +296,6 @@ func buildNIP22Tags(evt *nostr.Event, target *nostr.Event, relayHints []string)
eTag = append(eTag, relayHint)
}
evt.Tags = append(evt.Tags, eTag)
}
evt.Tags = append(evt.Tags, nostr.Tag{"k", fmt.Sprint(target.Kind)})