From 137c09369a81f00250802b7b0a5689eaa7e66423 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 18 Feb 2026 10:43:33 -0300 Subject: [PATCH] khatru/policies: fix tagName usage in PreventNormalDuplicates() --- khatru/policies/events.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/khatru/policies/events.go b/khatru/policies/events.go index eca5f16..3e7286e 100644 --- a/khatru/policies/events.go +++ b/khatru/policies/events.go @@ -153,12 +153,12 @@ func RejectUnprefixedNostrReferences(ctx context.Context, event nostr.Event) (bo func PreventNormalDuplicates(query func(nostr.Filter, int) iter.Seq[nostr.Event]) func(ctx context.Context, event nostr.Event) (bool, string) { exists := func(event nostr.Event, tagName string) bool { hasAll := true - for e := range event.Tags.FindAll("e") { + for t := range event.Tags.FindAll(tagName) { hasThis := false for range query(nostr.Filter{ Authors: []nostr.PubKey{event.PubKey}, Kinds: []nostr.Kind{event.Kind}, - Tags: nostr.TagMap{"e": []string{e[1]}}, + Tags: nostr.TagMap{tagName: []string{t[1]}}, }, 1) { hasThis = true }