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, - }, - }; -}