diff --git a/api/activitypub/actor.ts b/api/activitypub/actor.ts index 87619a7..97740ce 100644 --- a/api/activitypub/actor.ts +++ b/api/activitypub/actor.ts @@ -11,13 +11,13 @@ export default async function (req: VercelRequest, res: VercelResponse) { res.status(200).setHeader("Content-Type", "application/activity+json").json({ "@context": ["https://www.w3.org/ns/activitystreams", { "@language": "en-US" }], "type": "Person", - "id": "https://coderrrrr.site/blog", + "id": "https://coderrrrr.site/@blog", "outbox": "https://coderrrrr.site/api/activitypub/outbox", "following": "https://coderrrrr.site/api/activitypub/following", "followers": "https://coderrrrr.site/api/activitypub/followers", "sharedInbox": "https://coderrrrr.site/api/activitypub/sharedInbox", "inbox": "https://coderrrrr.site/api/activitypub/inbox", - "url": "https://coderrrrr.site/blog" + "url": "https://coderrrrr.site/@blog" "published": "2024-05-02T15:25:40Z", "preferredUsername": "blog", "name": "Deva Midhun's blog", @@ -33,8 +33,8 @@ export default async function (req: VercelRequest, res: VercelResponse) { "url": "https://i.ibb.co/N6J5b8WS/download20250102015611.png" }, "publicKey": { - "id": "https://coderrrrr.site/blog#main-key", - "owner": "https://coderrrrr.site/blog", + "id": "https://coderrrrr.site/@blog#main-key", + "owner": "https://coderrrrr.site/@blog", "publicKeyPem": process.env.ACTIVITYPUB_PUBLIC_KEY || "MISSING_PUBLIC_KEY" }, "attachment": [ diff --git a/api/activitypub/inbox.ts b/api/activitypub/inbox.ts index a702ace..6e1554d 100644 --- a/api/activitypub/inbox.ts +++ b/api/activitypub/inbox.ts @@ -161,13 +161,13 @@ async function removeLike(message: AP.Like) { /* { '@context': 'https://www.w3.org/ns/activitystreams', - id: 'https://coderrrrr.site/coder#likes/854/undo', + id: 'https://coderrrrr.site/@blog#likes/854/undo', type: 'Undo', - actor: 'https://coderrrrr.site/coder', + actor: 'https://coderrrrr.site/@blog', object: { - id: 'https://coderrrrr.site/coder#likes/854', + id: 'https://coderrrrr.site/@blog#likes/854', type: 'Like', - actor: 'https://coderrrrr.site/coder', + actor: 'https://coderrrrr.site/@blog', object: 'https://coderrrrr.site/thoughts-on-web-follow/' } } @@ -232,7 +232,7 @@ async function saveFollow(message: AP.Follow, actorInformation: AP.Actor) { "@context": "https://www.w3.org/ns/activitystreams", 'id': `https://${domain}/${guid}`, 'type': 'Accept', - 'actor': "https://coderrrrr.site/coder", + 'actor': "https://coderrrrr.site/@blog", 'object': (message.actor as CoreObject).id }; diff --git a/api/well-known/webfinger.ts b/api/well-known/webfinger.ts index 746b117..8171aaf 100644 --- a/api/well-known/webfinger.ts +++ b/api/well-known/webfinger.ts @@ -14,12 +14,12 @@ export default function (req: VercelRequest, res: VercelResponse) { { "rel": "http://webfinger.net/rel/profile-page", "type": "text/html", - "href": "https://coderrrrr.site/blog" + "href": "https://coderrrrr.site/@blog" }, { "rel": "self", "type": "application/activity+json", - "href": "https://coderrrrr.site/blog" + "href": "https://coderrrrr.site/@blog" }, { "rel": "http://ostatus.org/schema/1.0/subscribe", diff --git a/lib/activitypub/utils/sendSignedRequest.ts b/lib/activitypub/utils/sendSignedRequest.ts index 53dee7f..2ae3ff2 100644 --- a/lib/activitypub/utils/sendSignedRequest.ts +++ b/lib/activitypub/utils/sendSignedRequest.ts @@ -3,7 +3,7 @@ import { Sha256Signer } from '../../http-signature/index.js'; import { createHash } from 'crypto'; export async function sendSignedRequest(endpoint: URL, object: AP.Activity): Promise { - const publicKeyId = "https://coderrrrr.site/coder#main-key"; + const publicKeyId = "https://coderrrrr.site/@blog#main-key"; const privateKey = process.env.ACTIVITYPUB_PRIVATE_KEY; const signer = new Sha256Signer({ publicKeyId, privateKey, headerNames: ["host", "date", "digest"] }); diff --git a/vercel.json b/vercel.json index a956589..a12bf31 100644 --- a/vercel.json +++ b/vercel.json @@ -32,7 +32,7 @@ "destination": "/api/activitypub/authorize_interaction.ts" }, { - "source": "/blog", + "source": "/@blog", "destination": "/api/activitypub/actor.ts" }, {