a tool for shared writing and social publishing
0

Configure Feed

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

add come online event to appview

Jared Pereira (Jul 25, 2025, 5:31 PM EDT) d0263d22 69ed8e21

+20 -1
+4
appview/index.ts
··· 215 215 process.on("SIGTERM", cleanup); 216 216 } 217 217 218 + inngest.send({ 219 + name: "appview/come-online", 220 + data: {}, 221 + }); 218 222 main();
+1
app/api/inngest/client.ts
··· 9 9 document_link: string; 10 10 }; 11 11 }; 12 + "appview/come-online": { data: {} }; 12 13 }; 13 14 14 15 // Create a client to send and receive events
+2 -1
app/api/inngest/route.tsx
··· 1 1 import { serve } from "inngest/next"; 2 2 import { inngest } from "app/api/inngest/client"; 3 3 import { index_post_mention } from "./functions/index_post_mention"; 4 + import { come_online } from "./functions/come_online"; 4 5 5 6 // Create an API that serves zero functions 6 7 export const { GET, POST, PUT } = serve({ 7 8 client: inngest, 8 - functions: [index_post_mention], 9 + functions: [index_post_mention, come_online], 9 10 });
+13
app/api/inngest/functions/come_online.ts
··· 1 + import { supabaseServerClient } from "supabase/serverClient"; 2 + import { inngest } from "../client"; 3 + import { AtpAgent, AtUri } from "@atproto/api"; 4 + import { Json } from "supabase/database.types"; 5 + import { ids } from "lexicons/api/lexicons"; 6 + 7 + export const come_online = inngest.createFunction( 8 + { id: "come_online" }, 9 + { event: "appview/come-online" }, 10 + async ({ event, step }) => { 11 + return { online: true }; 12 + }, 13 + );