filters: fix hashtag filters

We might need to move to something a bit more generic that works
for all generic tag filters.
This commit is contained in:
William Casarin
2024-03-22 10:23:41 +01:00
parent 450709afa7
commit 2936012308
2 changed files with 9 additions and 0 deletions

View File

@@ -24,6 +24,11 @@ pub fn convert_enostr_filter(filter: &enostr::Filter) -> nostrdb::Filter {
nfilter.pubkeys(pubkeys.iter().map(|a| *a.bytes()).collect());
}
// #t
if let Some(ref hashtags) = filter.hashtags {
nfilter.tags(hashtags.clone(), 't');
}
if let Some(since) = filter.since {
nfilter.since(since);
}