mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-17 00:44:18 +01:00
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:
@@ -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<_>>()
|
||||
|
||||
@@ -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<_>>();
|
||||
|
||||
Reference in New Issue
Block a user