this repo has no description
0
fork

Configure Feed

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

replace DELETE constant with the rkey to the post

+6 -7
+1 -2
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 = "delete"; 7 + export const DELETE = "3kwsqucto3j2a"; 8 8 export const POSTS: Record<string, string> = { 9 - "3kwsqucto3j2a": DELETE, 10 9 "3kwss4ldkwd2j": "they", 11 10 "3kwss4fmiow2n": "it", 12 11 "3kwss4bzqlw2k": "he",
+5 -5
src/label.ts
··· 21 21 22 22 export const label = async ( 23 23 subject: string | AppBskyActorDefs.ProfileView, 24 - uri: string, 24 + rkey: string, 25 25 ) => { 26 26 const did = AppBskyActorDefs.isProfileView(subject) ? subject.did : subject; 27 27 ··· 38 38 return set; 39 39 }, new Set<string>()); 40 40 41 - if (POSTS[uri]?.includes(DELETE)) { 41 + if (rkey.includes(DELETE)) { 42 42 await server 43 43 .createLabels({ uri: did }, { negate: [...labels] }) 44 44 .catch((err) => { 45 45 console.log(err); 46 46 }) 47 47 .then(() => console.log(`Deleted labels for ${did}`)); 48 - } else if (labels.size < LABEL_LIMIT && POSTS[uri]) { 48 + } else if (labels.size < LABEL_LIMIT && POSTS[rkey]) { 49 49 await server 50 - .createLabel({ uri: did, val: POSTS[uri] }) 50 + .createLabel({ uri: did, val: POSTS[rkey] }) 51 51 .catch((err) => { 52 52 console.log(err); 53 53 }) 54 - .then(() => console.log(`Labeled ${did} with ${POSTS[uri]}`)); 54 + .then(() => console.log(`Labeled ${did} with ${POSTS[rkey]}`)); 55 55 } 56 56 };