From d6834528a740068c35ec5cc3505555e8406b3ce6 Mon Sep 17 00:00:00 2001 From: sam Date: Sat, 22 Jul 2023 18:07:13 +0200 Subject: [PATCH] remove code i left over from mercury, woops --- src/ap/blog.ts | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 src/ap/blog.ts diff --git a/src/ap/blog.ts b/src/ap/blog.ts deleted file mode 100644 index be050c0..0000000 --- a/src/ap/blog.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { BASE_URL } from "~/config.js"; -import { Blog } from "~/db/entities/blog.js"; - -/** Transforms the given Blog into an ActivityPub Person. It is the caller's responsibility to ensure the blog is local. */ -export function blogToActivityPub(blog: Blog) { - return { - "@context": "https://www.w3.org/ns/activitystreams", - type: "Person", - id: `${BASE_URL}/blogs/${blog.username}`, - inbox: `${BASE_URL}/blogs/${blog.username}/inbox`, - outbox: `${BASE_URL}/blogs/${blog.username}/outbox`, - name: blog.username, - preferredUsername: blog.username, - publicKey: { - id: `${BASE_URL}/blogs/${blog.username}#main-key`, - owner: `${BASE_URL}/blogs/${blog.username}`, - publicKeyPem: blog.publicKey, - }, - }; -}