Spark feed generator template
6
fork

Configure Feed

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

at main 24 lines 630 B view raw
1import { Server } from "../lex/index.ts"; 2import { AppContext } from "../main.ts"; 3import algos from "../algos/index.ts"; 4import { AtUri } from "@atp/syntax"; 5import { Algorithm } from "../algos/types.ts"; 6 7export default function (server: Server, ctx: AppContext) { 8 server.so.sprk.feed.describeFeedGenerator(() => { 9 const feeds = algos.map((algo: Algorithm) => ({ 10 uri: AtUri.make( 11 algo.publisherDid, 12 "so.sprk.feed.generator", 13 algo.rkey, 14 ).toString(), 15 })); 16 return { 17 encoding: "application/json", 18 body: { 19 did: ctx.ownDid, 20 feeds, 21 }, 22 }; 23 }); 24}