Cleanup and Maintenance part 1 #1

Merged
astra merged 10 commits from ari/CleanAndMaintenance into main 2025-04-21 06:30:50 +00:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit d92f6f6514 - Show all commits

View file

@ -15,10 +15,10 @@ export class Config {
static readonly FRONTEND_URL: string = "https://deer.social";
/**
* Maximum number of posts to fetch from the PDS per user
* @default 10
* Maximum number of posts to show in the feed (across all users)
* @default 100
*/
static readonly MAX_POSTS_PER_USER: number = 22;
static readonly MAX_POSTS: number = 100;
/**
* Footer text for the dashboard

View file

@ -167,7 +167,7 @@ const fetchPosts = async (did: string) => {
params: {
repo: did as At.Identifier,
collection: "app.bsky.feed.post",
limit: Config.MAX_POSTS_PER_USER,
limit: Config.MAX_POSTS,
},
});
return {
@ -238,7 +238,7 @@ const fetchAllPosts = async () => {
})
);
posts.sort((a, b) => b.timestamp - a.timestamp);
return posts;
return posts.slice(0, Config.MAX_POSTS);
};
export { fetchAllPosts, getAllMetadataFromPds, Post };
export type { AccountMetadata };