From a3a569013e2247e1745b009aceaecbf86c0e5ccb Mon Sep 17 00:00:00 2001 From: Moon Man Date: Tue, 26 Dec 2023 08:07:57 -0500 Subject: [PATCH] rm commented code --- src/activity.ts | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/activity.ts b/src/activity.ts index 2b96219..17b328a 100644 --- a/src/activity.ts +++ b/src/activity.ts @@ -46,32 +46,6 @@ export const handleInboxPost = async (req: Request) => { finally { } }; -/* -export const sendActivity = async (publicKeyId: string, privateKey: string, activity: string, hash: string, inbox: string) => { - const headers: Record = { - date: new Date().toUTCString(), - digest: hash, - host: new URL(inbox).host, - "content-type": `application/ld+json; profile="${CONTEXT}"` - }; - - const signer = new Sha256Signer({ privateKey, publicKeyId }); - const signature = signer.sign({ - url: inbox, - method: "POST", - headers: flattenHeaders(headers) - }); - - headers.signature = signature; - - return fetch(inbox, { - method: "POST", - headers, - body: activity - }); -}; -*/ - export const deleteArticleActivity = (article: Article, user: User) => { const actor = fillRoute("actor", user.nickname); const published = typeof article.updated_at === "number" ? new Date(article.updated_at) : article.updated_at;