Retro Bulletin Board Systems on atproto. Web app and TUI. lazy mirror of alyraffauf/atbbs atbbs.xyz
forums python tui atproto bbs
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

web/ts/atproto: harmonize limits

+3 -2
+3 -2
web/ts/lib/atproto.ts
··· 3 3 */ 4 4 5 5 import { fetchJson } from "./api"; 6 + import { BACKLINK_LIMIT } from "./lexicon"; 6 7 7 8 const SLINGSHOT = "https://slingshot.microcosm.blue/xrpc"; 8 9 const CONSTELLATION = "https://constellation.microcosm.blue/xrpc"; ··· 83 84 export async function getBacklinks( 84 85 subject: string, 85 86 source: string, 86 - limit = 25, 87 + limit = BACKLINK_LIMIT, 87 88 cursor?: string, 88 89 ): Promise<BacklinksResponse> { 89 90 let url = `${CONSTELLATION}/blue.microcosm.links.getBacklinks?subject=${encodeURIComponent(subject)}&source=${encodeURIComponent(source)}&limit=${limit}`; ··· 120 121 hiddenPosts?: Set<string>; 121 122 }, 122 123 ): Promise<FetchAndHydrateResult> { 123 - const limit = opts?.limit ?? 50; 124 + const limit = opts?.limit ?? BACKLINK_LIMIT; 124 125 125 126 const backlinks = await getBacklinks(subject, source, limit, opts?.cursor); 126 127 if (!backlinks.records.length) return { records: [], cursor: null };