Files
remanso-jetstream/main.ts
2026-02-07 21:13:55 +01:00

39 lines
963 B
TypeScript

import { Jetstream } from "@skyware/jetstream";
const jetstream = new Jetstream({
wantedCollections: [
"site.standard.graph.subscription",
"site.standard.publication",
"site.standard.document",
"space.litenote.post",
],
});
// Handle standard posts
jetstream.onCreate("site.standard.graph.subscription", (event) => {
// Check if it references litenote content
const { did, commit } = event
console.log(did, commit);
});
jetstream.onCreate("site.standard.publication", (event) => {
// Check if it references litenote content
const { did, commit } = event
console.log(did, commit);
});
// Handle standard posts
jetstream.onCreate("site.standard.document", (event) => {
// Check if it references litenote content
const { did, commit } = event
console.log(did, commit);
});
// Handle your custom posts
jetstream.onCreate("space.litenote.post", (event) => {
// Process litenote-specific data
});
jetstream.start();