deprecate all useless tag methods, implement Find() and friends.

This commit is contained in:
fiatjaf
2025-03-10 02:33:29 -03:00
parent 99b11ea3be
commit a52165fb7d
6 changed files with 90 additions and 75 deletions

View File

@@ -26,9 +26,9 @@ func HyperLogLogEventPubkeyOffsetsAndReferencesForEvent(evt *nostr.Event) iter.S
//
// reaction counts:
// (only the last "e" tag counts)
lastE := evt.Tags.GetLast([]string{"e", ""})
lastE := evt.Tags.FindLast("e")
if lastE != nil {
v := (*lastE)[1]
v := lastE[1]
if nostr.IsValid32ByteHex(v) {
// 32th nibble of "e" tag
p, _ := strconv.ParseInt(v[32:33], 16, 64)