mirror of
https://github.com/fiatjaf/nak.git
synced 2026-10-05 15:18:23 +00:00
Merge pull request #153 from mattn/fix/nip22-parent-of-external-comment
publish: reference the parent comment with an e tag under external-content (I) threads
This commit is contained in:
@@ -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)})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user