diff --git a/crates/notedeck/src/contacts.rs b/crates/notedeck/src/contacts.rs index f6f2cb27..b3f9a128 100644 --- a/crates/notedeck/src/contacts.rs +++ b/crates/notedeck/src/contacts.rs @@ -16,9 +16,9 @@ pub fn hybrid_contacts_filter( with_hashtags: bool, ) -> Result { let local = filter::filter_from_tags(note, add_pk, with_hashtags)? - .into_filter([1], filter::default_limit()); + .into_filter(vec![1], filter::default_limit()); let remote = filter::filter_from_tags(note, add_pk, with_hashtags)? - .into_filter([1, 0], filter::default_remote_limit()); + .into_filter(vec![1, 0], filter::default_remote_limit()); Ok(HybridFilter::split(local, remote)) } diff --git a/crates/notedeck/src/filter.rs b/crates/notedeck/src/filter.rs index 81aecae3..40374362 100644 --- a/crates/notedeck/src/filter.rs +++ b/crates/notedeck/src/filter.rs @@ -271,18 +271,18 @@ impl FilteredTags { } // TODO: make this more general - pub fn into_filter(self, kinds: I, limit: u64) -> Vec - where - I: IntoIterator + Copy, - { + pub fn into_filter(self, shared_kinds: Vec, limit: u64) -> Vec { let mut filters: Vec = Vec::with_capacity(2); if let Some(authors) = self.authors { - filters.push(authors.kinds(kinds).limit(limit).build()) + let mut author_kinds = shared_kinds.clone(); + author_kinds.insert(0, 6); + + filters.push(authors.kinds(author_kinds).limit(limit).build()) } if let Some(hashtags) = self.hashtags { - filters.push(hashtags.kinds(kinds).limit(limit).build()) + filters.push(hashtags.kinds(shared_kinds).limit(limit).build()) } filters