Fix binary tag value handling for e/p tags across database layer
Some checks failed
Go / build-and-release (push) Has been cancelled
Some checks failed
Go / build-and-release (push) Has been cancelled
- Update nostr library to v1.0.3 with improved binary tag support - Replace tag.Value() calls with tag.ValueHex() to handle both binary and hex formats - Add NormalizeTagValueForHash() for consistent filter tag normalization - Update QueryPTagGraph to handle binary-encoded and hex-encoded pubkeys - Fix tag matching in query-events.go using TagValuesMatchUsingTagMethods - Add filter_utils.go with tag normalization helper functions - Update delete operations in process-delete.go and neo4j/delete.go - Fix ACL follows extraction to use ValueHex() for consistent decoding - Add binary_tag_filter_test.go for testing tag value normalization - Bump version to v0.30.3
This commit is contained in:
@@ -928,8 +928,8 @@ func (f *Follows) extractFollowedPubkeys(event *event.E) {
|
||||
continue
|
||||
}
|
||||
// Fall back to hex decoding for non-binary values
|
||||
// ValueHex() handles both formats, but we already checked binary above
|
||||
if pubkey, err := hex.DecodeString(string(tag.Value())); err == nil && len(pubkey) == 32 {
|
||||
// Use ValueHex() which handles both binary and hex storage formats
|
||||
if pubkey, err := hex.DecodeString(string(tag.ValueHex())); err == nil && len(pubkey) == 32 {
|
||||
f.AddFollow(pubkey)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user