Skip to content

Commit

Permalink
Special-case fedi.buzz
Browse files Browse the repository at this point in the history
FediBuzz implements the tag search mastodon API, but not the other timelines.
  • Loading branch information
defnull committed Dec 27, 2024
1 parent 056cf76 commit b130487
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export async function fetchPosts(cfg: Config, onProgress: (progress: Progress) =
const [user, domain] = account.split('@', 2)
const domains = domain ? [domain] : [...cfg.servers]
for (const domain of domains) {
if(domain === "fedi.buzz") continue
addTask(domain, async () => {
const localUser = await getLocalUser(user, domain)
if (!localUser || !localUser.id) return [];
Expand All @@ -61,6 +62,7 @@ export async function fetchPosts(cfg: Config, onProgress: (progress: Progress) =
// Load trends from all servers
if (cfg.loadTrends) {
for (const domain of cfg.servers) {
if(domain === "fedi.buzz") continue
addTask(domain, async () => {
return await fetchJson(domain, "api/v1/trends/statuses", { limit: cfg.limit })
})
Expand All @@ -71,6 +73,7 @@ export async function fetchPosts(cfg: Config, onProgress: (progress: Progress) =
// or just federated posts.
if (cfg.loadPublic || cfg.loadFederated) {
for (const domain of cfg.servers) {
if(domain === "fedi.buzz") continue
const query: Record<string, any> = { limit: cfg.limit }
if (!cfg.loadPublic) query.remote = "True"
if (!cfg.loadFederated) query.local = "True"
Expand Down

0 comments on commit b130487

Please sign in to comment.