Fix hashtag filter inconsistency causing notes not to display in channels

This commit fixes a critical bug where hashtag filters were created
inconsistently, preventing notes from displaying in channel timelines.

Problem:
- TimelineKind::filters() was creating subscription filters with
  lowercase hashtags: .tags([tag.to_lowercase().as_str()], 't')
- But Timeline::hashtag() and TimelineKind::into_timeline() for Relay
  variant were creating query filters WITHOUT lowercasing
- This caused a mismatch when querying nostrdb, as Nostr hashtags
  are case-insensitive and stored lowercase
- Result: Notes were received (66 notes in bitcoin channel) but not
  displayed in the GUI

Solution:
- Make ALL hashtag filter creation use .to_lowercase() for consistency
- Updated Timeline::hashtag() (mod.rs:279)
- Updated TimelineKind::into_timeline() Relay variant (kind.rs:668)

This ensures subscription filters and query filters use the same
lowercase hashtag format, allowing notes to properly display in channels.
This commit is contained in:
Claude
2025-11-15 11:35:42 +00:00
parent 10c17bdf90
commit b5066ae1db
2 changed files with 2 additions and 2 deletions

View File

@@ -665,7 +665,7 @@ impl TimelineKind {
Filter::new()
.kinds([1])
.limit(filter::default_limit())
.tags([tag.as_str()], 't')
.tags([tag.to_lowercase().as_str()], 't')
.build()
})
.collect::<Vec<_>>()

View File

@@ -276,7 +276,7 @@ impl Timeline {
Filter::new()
.kinds([1])
.limit(filter::default_limit())
.tags([tag.as_str()], 't')
.tags([tag.to_lowercase().as_str()], 't')
.build()
})
.collect::<Vec<_>>();