File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
notedeck_columns/src/timeline Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,11 @@ impl FilteredTags {
192
192
193
193
/// Create a filter from tags. This can be used to create a filter
194
194
/// from a contact list
195
- pub fn filter_from_tags ( note : & Note , add_pubkey : Option < & [ u8 ; 32 ] > ) -> Result < FilteredTags > {
195
+ pub fn filter_from_tags (
196
+ note : & Note ,
197
+ add_pubkey : Option < & [ u8 ; 32 ] > ,
198
+ with_hashtags : bool ,
199
+ ) -> Result < FilteredTags > {
196
200
let mut author_filter = Filter :: new ( ) ;
197
201
let mut hashtag_filter = Filter :: new ( ) ;
198
202
let mut author_res: Option < FilterBuilder > = None ;
@@ -233,7 +237,7 @@ pub fn filter_from_tags(note: &Note, add_pubkey: Option<&[u8; 32]>) -> Result<Fi
233
237
234
238
author_filter. add_id_element ( author) ?;
235
239
author_count += 1 ;
236
- } else if t == "t" {
240
+ } else if t == "t" && with_hashtags {
237
241
let hashtag = if let Some ( hashtag) = tag. get_unchecked ( 1 ) . variant ( ) . str ( ) {
238
242
hashtag
239
243
} else {
Original file line number Diff line number Diff line change @@ -204,7 +204,9 @@ impl Timeline {
204
204
deck_author : Option < & [ u8 ; 32 ] > ,
205
205
) -> Result < Self > {
206
206
let our_pubkey = deck_author. map ( |da| pk_src. to_pubkey_bytes ( da) ) ;
207
- let filter = filter:: filter_from_tags ( contact_list, our_pubkey) ?. into_follow_filter ( ) ;
207
+ let with_hashtags = false ;
208
+ let filter =
209
+ filter:: filter_from_tags ( contact_list, our_pubkey, with_hashtags) ?. into_follow_filter ( ) ;
208
210
209
211
Ok ( Timeline :: new (
210
212
TimelineKind :: contact_list ( pk_src) ,
@@ -689,6 +691,7 @@ pub fn is_timeline_ready(
689
691
info ! ( "notes found for contact timeline after GotRemote!" ) ;
690
692
691
693
let note_key = res[ 0 ] ;
694
+ let with_hashtags = false ;
692
695
693
696
let filter = {
694
697
let txn = Transaction :: new ( ndb) . expect ( "txn" ) ;
@@ -698,7 +701,7 @@ pub fn is_timeline_ready(
698
701
. pubkey_source ( )
699
702
. as_ref ( )
700
703
. and_then ( |pk_src| our_pk. map ( |pk| pk_src. to_pubkey_bytes ( pk) ) ) ;
701
- filter:: filter_from_tags ( & note, add_pk) . map ( |f| f. into_follow_filter ( ) )
704
+ filter:: filter_from_tags ( & note, add_pk, with_hashtags ) . map ( |f| f. into_follow_filter ( ) )
702
705
} ;
703
706
704
707
// TODO: into_follow_filter is hardcoded to contact lists, let's generalize
You can’t perform that action at this time.
0 commit comments