use std::{collections::BTreeMap, str::FromStr};
use strum::ParseError;
+const RSS_FETCH_LIMIT: i64 = 20;
+
#[derive(Deserialize)]
struct Params {
sort: Option<String>,
PostQueryBuilder::create(conn)
.listing_type(listing_type)
.sort(sort_type)
+ .limit(RSS_FETCH_LIMIT)
.list()
})
.await??;
.listing_type(ListingType::All)
.sort(*sort_type)
.creator_id(person.id)
+ .limit(RSS_FETCH_LIMIT)
.list()?;
let items = create_post_items(posts, protocol_and_hostname)?;
.listing_type(ListingType::Community)
.sort(*sort_type)
.community_id(community.id)
+ .limit(RSS_FETCH_LIMIT)
.list()?;
let items = create_post_items(posts, protocol_and_hostname)?;
.show_bot_accounts(local_user.show_bot_accounts)
.show_read_posts(local_user.show_read_posts)
.sort(*sort_type)
+ .limit(RSS_FETCH_LIMIT)
.list()?;
let items = create_post_items(posts, protocol_and_hostname)?;
.my_person_id(person_id)
.show_bot_accounts(show_bot_accounts)
.sort(sort)
+ .limit(RSS_FETCH_LIMIT)
.list()?;
let mentions = PersonMentionQueryBuilder::create(conn)
.recipient_id(person_id)
.my_person_id(person_id)
.sort(sort)
+ .limit(RSS_FETCH_LIMIT)
.list()?;
let items = create_reply_and_mention_items(replies, mentions, protocol_and_hostname)?;