remove code i left over from mercury, woops

This commit is contained in:
sam 2023-07-22 18:07:13 +02:00
parent a2b7303da3
commit d6834528a7
Signed by: sam
GPG key ID: B4EF20DDE721CAA1

View file

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