this repo has no description
0
fork

Configure Feed

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

add constant for delete post substring

+10 -2
+1
src/constants.ts
··· 4 4 export const SIGNING_KEY = process.env.SIGNING_KEY ?? ""; 5 5 export const PORT = 4001; 6 6 export const LABEL_LIMIT = 4; 7 + export const DELETE_POST = "delete"; 7 8 export const POSTS: Record<string, string> = { 8 9 "3kwsqucto3j2a": "delete", 9 10 "3kwss4ldkwd2j": "they",
+9 -2
src/label.ts
··· 1 1 import { AppBskyActorDefs, ComAtprotoLabelDefs } from "@atproto/api"; 2 - import { DID, PORT, LABEL_LIMIT, POSTS, SIGNING_KEY } from "./constants.js"; 2 + import { 3 + DID, 4 + PORT, 5 + LABEL_LIMIT, 6 + POSTS, 7 + SIGNING_KEY, 8 + DELETE_POST, 9 + } from "./constants.js"; 3 10 import { LabelerServer } from "@skyware/labeler"; 4 11 5 12 const server = new LabelerServer({ did: DID, signingKey: SIGNING_KEY }); ··· 31 38 return set; 32 39 }, new Set<string>()); 33 40 34 - if (POSTS[uri]?.includes("delete")) { 41 + if (POSTS[uri]?.includes(DELETE_POST)) { 35 42 await server 36 43 .createLabels({ uri: did }, { negate: [...labels] }) 37 44 .catch((err) => {