Updated config documentation

This commit is contained in:
Ariadna 2025-04-21 23:11:17 -04:00
parent 9a2ea50420
commit dc3039ef8b
Signed by: ari
SSH key fingerprint: SHA256:j4xpQafvRcIH4rwZqM5aREIogWsCjyYohia7vH0+uZY
2 changed files with 12 additions and 8 deletions

View file

@ -9,14 +9,17 @@ export class Config {
static readonly PDS_URL: string = "https://pds.witchcraft.systems";
/**
* The base URL of the frontend service for linking to replies
* The base URL of the frontend service for linking to replies/quotes/accounts etc.
* @default "https://deer.social"
*/
static readonly FRONTEND_URL: string = "https://deer.social";
/**
* Maximum number of posts to show in the feed (across all users)
* @default 100
* Maximum number of posts to fetch from the PDS per request
* Should be around 20 for about 10 users on the pds
* The more users you have, the lower the number should be
* since sorting is slow and is done on the frontend
* @default 20
*/
static readonly MAX_POSTS: number = 20;

View file

@ -240,6 +240,7 @@ const filterPostsByDate = (posts: PostsAcc[], cutoffDate: Date) => {
});
return filteredPosts;
};
// nightmare function. However it works so I am not touching it
const getNextPosts = async () => {
if (!accountsMetadata.length) {
accountsMetadata = await getAllMetadataFromPds();