···8899 const post = URIs[uri];
10101111- if (repo.data.labels && post.includes("Like this post to delete")) {
1111+ if (repo.data.labels && (post ?? "").includes("Like this post to delete")) {
1212 await agent
1313 .withProxy("atproto_labeler", DID)
1414 .api.tools.ozone.moderation.emitEvent({
+4-4
src/main.ts
···77const subscribe = async () => {
88 const agent = await getAgent();
991010- //const firehose = new Firehose("wss://bsky.network", { cursor: "759324067" });
1111- const firehose = new Firehose();
1010+ // add firehose cursor save
1111+ const firehose = new Firehose({ cursor: "759165458" });
1212 firehose.on("commit", (commit) => {
1313 for (const op of commit.ops) {
1414 if (op.action === "delete") continue;
1515 if (AppBskyFeedLike.isRecord(op.record)) {
1616- if (op.record.subject.uri.includes(DID)) {
1717- if (op.record.subject.uri.includes("app.bsky.feed.post")) {
1616+ if ((op.record.subject.uri ?? "").includes(DID)) {
1717+ if ((op.record.subject.uri ?? "").includes("app.bsky.feed.post")) {
1818 label(agent, commit.repo, op.record.subject.uri).catch((err) =>
1919 console.error(err),
2020 );