โ– humdrum codex / soft
709 B raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import type { SourceModule } from "../registry";
import { fetchRss } from "../rss";
import {
  FeedsConfig,
  FeedsPayload,
  type FeedsConfig as Config,
  type FeedsPayload as Payload,
} from "@/lib/schemas/sources/feeds";

// "My Feeds" โ€” the user's personal RSS subscriptions, separate from the curated
// News card. Same RSS fetch; distinct kind so it gets its own card + config.
export const feedsModule: SourceModule<Config, Payload> = {
  kind: "feeds",
  label: "My Feeds",
  keyless: true,
  defaultRefreshSeconds: 1800,
  configSchema: FeedsConfig,
  payloadSchema: FeedsPayload,

  isConfigured: (config) => config.feeds.length > 0,

  fetch: ({ config, signal }) => fetchRss(config, signal),
};