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: remove hardcoded backlink limit

+5 -8
+2 -3
web/ts/lib/atproto.ts
··· 3 3 */ 4 4 5 5 import { fetchJson } from "./api"; 6 - import { BACKLINK_LIMIT } from "./lexicon"; 7 6 8 7 const SLINGSHOT = "https://slingshot.microcosm.blue/xrpc"; 9 8 const CONSTELLATION = "https://constellation.microcosm.blue/xrpc"; ··· 90 89 export async function getBacklinks( 91 90 subject: string, 92 91 source: string, 93 - limit = BACKLINK_LIMIT, 92 + limit = 50, 94 93 cursor?: string, 95 94 ): Promise<BacklinksResponse> { 96 95 let url = `${CONSTELLATION}/blue.microcosm.links.getBacklinks?subject=${encodeURIComponent(subject)}&source=${encodeURIComponent(source)}&limit=${limit}`; ··· 127 126 hiddenPosts?: Set<string>; 128 127 }, 129 128 ): Promise<FetchAndHydrateResult> { 130 - const limit = opts?.limit ?? BACKLINK_LIMIT; 129 + const limit = opts?.limit ?? 50; 131 130 132 131 const backlinks = await getBacklinks(subject, source, limit, opts?.cursor); 133 132 if (!backlinks.records.length) return { records: [], cursor: null };
-2
web/ts/lib/lexicon.ts
··· 8 8 export const NEWS = "xyz.atboards.news"; 9 9 export const THREAD = "xyz.atboards.thread"; 10 10 export const REPLY = "xyz.atboards.reply"; 11 - 12 - export const BACKLINK_LIMIT = 50;
+3 -3
web/ts/pages/account.ts
··· 6 6 parseAtUri, 7 7 type HydratedRecord, 8 8 } from "../lib/atproto"; 9 - import { THREAD, REPLY, BACKLINK_LIMIT } from "../lib/lexicon"; 9 + import { THREAD, REPLY } from "../lib/lexicon"; 10 10 11 11 interface InboxItem { 12 12 type: string; ··· 133 133 const { records } = await fetchAndHydrate( 134 134 tr.uri, 135 135 `${REPLY}:subject`, 136 - { limit: BACKLINK_LIMIT, excludeDid: did }, 136 + { limit: 50, excludeDid: did }, 137 137 ); 138 138 return recordsToInboxItems( 139 139 records, ··· 149 149 ...replyRecords.map(async (rr) => { 150 150 try { 151 151 const { records } = await fetchAndHydrate(rr.uri, `${REPLY}:quote`, { 152 - limit: BACKLINK_LIMIT, 152 + limit: 50, 153 153 excludeDid: did, 154 154 }); 155 155 return recordsToInboxItems(