2023-09-28 02:23:25 +00:00
|
|
|
import { BASE_URL, HOSTNAME, PUBLIC_KEY } from "./src/env"
|
2023-09-28 01:15:25 +00:00
|
|
|
|
|
|
|
// change "activitypub" to whatever you want your account name to be
|
|
|
|
export const preferredUsername:string = process.env.ACCOUNT || "activitypub"
|
|
|
|
export const name = process.env.REAL_NAME || preferredUsername
|
|
|
|
export const summary = ""
|
|
|
|
|
|
|
|
// avatar image
|
2023-09-28 02:23:25 +00:00
|
|
|
const icon:{ type:"Image", mediaType:string, url:string, name:string } = {
|
2023-09-28 01:15:25 +00:00
|
|
|
type: "Image",
|
2023-10-11 05:25:14 +00:00
|
|
|
mediaType: "image/png",
|
|
|
|
url: "https://s.gravatar.com/avatar/bc0f8c2d2ecc533cb236ce1f858365a25dbbc80ce42df49b9a95e88f07f91720?s=800",
|
2023-09-28 02:23:25 +00:00
|
|
|
name: "My profile photo — a pixelated version of me"
|
2023-09-28 01:15:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// banner image
|
2023-09-28 02:23:25 +00:00
|
|
|
const image:{ type:"Image", mediaType:string, url:string, name:string } = {
|
2023-09-28 01:15:25 +00:00
|
|
|
type: "Image",
|
|
|
|
mediaType: "image/jpeg",
|
2023-09-28 02:23:25 +00:00
|
|
|
url: BASE_URL + "/assets/img/banner-1500x500.jpg",
|
|
|
|
name: "A grim reaper in a decorated cubicle, writing and daydreaming, surrounded by many other grim reapers in bland, grey, cubicles"
|
2023-09-28 01:15:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// This is a list of other actor ids you identify as
|
|
|
|
const alsoKnownAs:string[] = []
|
|
|
|
|
|
|
|
// I'm not exactly sure what this time represents.
|
|
|
|
// The date your website got published?
|
|
|
|
const published:string = "2023-09-14T00:00:00Z"
|
|
|
|
|
|
|
|
// customize this to add or remove PropertyValues
|
|
|
|
// this is the table that appears on Mastodon, etc, profile pages
|
|
|
|
const attachment:{ type:"PropertyValue", name:string, value:string }[] = [
|
|
|
|
{
|
|
|
|
type: "PropertyValue",
|
|
|
|
name: "Pronouns",
|
|
|
|
value: "they/them"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "PropertyValue",
|
|
|
|
name: "Website",
|
|
|
|
value: `<a href="${BASE_URL}" target="_blank" rel="nofollow noopener noreferrer me">${BASE_URL}</a>`
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
2023-10-02 22:19:04 +00:00
|
|
|
const ACTOR = {
|
2023-09-28 01:15:25 +00:00
|
|
|
"@context": [
|
|
|
|
"https://www.w3.org/ns/activitystreams",
|
|
|
|
"https://w3id.org/security/v1",
|
|
|
|
{
|
|
|
|
manuallyApprovesFollowers: "as:manuallyApprovesFollowers",
|
|
|
|
toot: "http://joinmastodon.org/ns#",
|
|
|
|
alsoKnownAs: {
|
|
|
|
"@id": "as:alsoKnownAs",
|
|
|
|
"@type": "@id"
|
|
|
|
},
|
|
|
|
schema: "http://schema.org#",
|
|
|
|
PropertyValue: "schema:PropertyValue",
|
|
|
|
value: "schema:value",
|
|
|
|
discoverable: "toot:discoverable",
|
|
|
|
Ed25519Signature: "toot:Ed25519Signature",
|
|
|
|
Ed25519Key: "toot:Ed25519Key",
|
|
|
|
Curve25519Key: "toot:Curve25519Key",
|
|
|
|
EncryptedMessage: "toot:EncryptedMessage",
|
|
|
|
publicKeyBase64: "toot:publicKeyBase64"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
id: BASE_URL,
|
|
|
|
type: "Person",
|
|
|
|
following: `${BASE_URL}/following`,
|
|
|
|
followers: `${BASE_URL}/followers`,
|
|
|
|
inbox: `${BASE_URL}/inbox`,
|
|
|
|
outbox: `${BASE_URL}/outbox`,
|
|
|
|
preferredUsername,
|
|
|
|
name,
|
|
|
|
summary,
|
2023-09-28 02:23:25 +00:00
|
|
|
hostname: HOSTNAME,
|
2023-09-28 01:15:25 +00:00
|
|
|
url: BASE_URL,
|
|
|
|
manuallyApprovesFollowers: false,
|
|
|
|
discoverable: true,
|
|
|
|
published,
|
|
|
|
alsoKnownAs,
|
|
|
|
publicKey: {
|
|
|
|
id: `${BASE_URL}#main-key`,
|
|
|
|
owner: BASE_URL,
|
|
|
|
publicKeyPem: PUBLIC_KEY,
|
|
|
|
},
|
|
|
|
attachment,
|
|
|
|
icon,
|
|
|
|
image
|
2023-10-02 22:19:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export const handle = `${ACTOR.preferredUsername}@${HOSTNAME}`
|
|
|
|
|
|
|
|
export const webfinger = {
|
|
|
|
subject: `acct:${ACTOR.preferredUsername}@${HOSTNAME}`,
|
|
|
|
aliases: [ACTOR.id],
|
|
|
|
links: [
|
|
|
|
{
|
|
|
|
"rel": "http://webfinger.net/rel/profile-page",
|
|
|
|
"type": "text/html",
|
|
|
|
"href": ACTOR.url
|
|
|
|
},
|
|
|
|
{
|
|
|
|
rel: "self",
|
|
|
|
type: "application/activity+json",
|
|
|
|
href: ACTOR.id,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default ACTOR
|