init
This commit is contained in:
39
main.ts
Normal file
39
main.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { Jetstream } from "@skyware/jetstream";
|
||||
|
||||
const jetstream = new Jetstream({
|
||||
wantedCollections: [
|
||||
"app.bsky.feed.like",
|
||||
"site.standard.publication",
|
||||
"site.standard.document",
|
||||
"space.litenote.post",
|
||||
],
|
||||
});
|
||||
|
||||
// Handle standard posts
|
||||
jetstream.onCreate("app.bsky.feed.like", (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();
|
||||
Reference in New Issue
Block a user