Skip to content

Commit

Permalink
Update post/ paths to posts/ in alignment with ActivityPub sepc
Browse files Browse the repository at this point in the history
Related: https://www.w3.org/TR/activitypub/
Signed-off-by: John Andersen <[email protected]>
  • Loading branch information
pdxjohnny authored and john-s-andersen committed Jan 30, 2023
1 parent df189a9 commit 4b960c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ admin.post("/create", async (req, res) => {
to: ["https://www.w3.org/ns/activitystreams#Public"],
cc: [`${actor}/followers`],
...body,
object: { ...object.contents, id: `${actor}/post/${object.id}` },
object: { ...object.contents, id: `${actor}/posts/${object.id}` },
});

for (const follower of listFollowers()) {
send(actor, follower.actor, {
...activity.contents,
id: `${actor}/post/${activity.id}`,
id: `${actor}/posts/${activity.id}`,
cc: [follower.actor],
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ webhook.post(`/${WEBHOOK_PATH}`, async (req, res) => {
to: ["https://www.w3.org/ns/activitystreams#Public"],
cc: [`${actor}/followers`],
...body,
object: { ...object.contents, id: `${actor}/post/${object.id}` },
object: { ...object.contents, id: `${actor}/posts/${object.id}` },
});

for (const follower of listFollowers()) {
send(actor, follower.actor, {
...activity.contents,
id: `${actor}/post/${activity.id}`,
id: `${actor}/posts/${activity.id}`,
cc: [follower.actor],
});
}
Expand Down

0 comments on commit 4b960c6

Please sign in to comment.