this repo has no description
0
fork

Configure Feed

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

rename to more generic name

+8 -9
+3 -4
src/constants.ts
··· 1 1 import "dotenv/config"; 2 2 3 - export const PRONOUNS: Record<string, string> = { 3 + export const DID = process.env.DID ?? ""; 4 + export const SIGNING_KEY = process.env.SIGNING_KEY ?? ""; 5 + export const POSTS: Record<string, string> = { 4 6 "3kwsqucto3j2a": "delete", 5 7 "3kwss4ldkwd2j": "they", 6 8 "3kwss4fmiow2n": "it", ··· 57 59 "3l2zv7xcpq62u": "shark-sharks", 58 60 "3l32xb7nvgh2x": "proper-nouns", 59 61 }; 60 - 61 - export const DID = process.env.DID ?? ""; 62 - export const SIGNING_KEY = process.env.SIGNING_KEY ?? "";
+5 -5
src/label.ts
··· 1 1 import { AppBskyActorDefs, ComAtprotoLabelDefs } from "@atproto/api"; 2 - import { DID, PRONOUNS, SIGNING_KEY } from "./constants.js"; 2 + import { DID, POSTS, SIGNING_KEY } from "./constants.js"; 3 3 import { LabelerServer } from "@skyware/labeler"; 4 4 5 5 const server = new LabelerServer({ did: DID, signingKey: SIGNING_KEY }); ··· 31 31 return set; 32 32 }, new Set<string>()); 33 33 34 - if (PRONOUNS[uri].includes("delete")) { 34 + if (POSTS[uri].includes("delete")) { 35 35 await server 36 36 .createLabels({ uri: did }, { negate: [...labels] }) 37 37 .catch((err) => { 38 38 console.log(err); 39 39 }) 40 40 .then(() => console.log(`Deleted labels for ${did}`)); 41 - } else if (labels.size < 4 && PRONOUNS[uri]) { 41 + } else if (labels.size < 4 && POSTS[uri]) { 42 42 await server 43 43 .createLabel({ 44 44 src: server.did, 45 45 uri: did, 46 - val: PRONOUNS[uri], 46 + val: POSTS[uri], 47 47 cts: new Date().toISOString(), 48 48 }) 49 49 .catch((err) => { 50 50 console.log(err); 51 51 }) 52 - .then(() => console.log(`Labeled ${did} with ${PRONOUNS[uri]}`)); 52 + .then(() => console.log(`Labeled ${did} with ${POSTS[uri]}`)); 53 53 } 54 54 };