@rmdes/indiekit-endpoint-activitypub 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,13 +41,22 @@ export function boostController(mountPath, plugin) {
41
41
  { handle, publicationUrl: plugin._publicationUrl },
42
42
  );
43
43
 
44
- const activityId = `urn:uuid:${crypto.randomUUID()}`;
44
+ const uuid = crypto.randomUUID();
45
+ const baseUrl = plugin._publicationUrl.replace(/\/$/, "");
46
+ const activityId = `${baseUrl}/activitypub/boosts/${uuid}`;
47
+
48
+ const publicAddress = new URL(
49
+ "https://www.w3.org/ns/activitystreams#Public",
50
+ );
51
+ const followersUri = ctx.getFollowersUri(handle);
45
52
 
46
53
  // Construct Announce activity
47
54
  const announce = new Announce({
48
55
  id: new URL(activityId),
49
56
  actor: ctx.getActorUri(handle),
50
57
  object: new URL(url),
58
+ to: publicAddress,
59
+ cc: followersUri,
51
60
  });
52
61
 
53
62
  // Send to followers via shared inbox
@@ -97,7 +97,9 @@ export function likeController(mountPath, plugin) {
97
97
  }
98
98
 
99
99
  // Generate a unique activity ID
100
- const activityId = `urn:uuid:${crypto.randomUUID()}`;
100
+ const uuid = crypto.randomUUID();
101
+ const baseUrl = plugin._publicationUrl.replace(/\/$/, "");
102
+ const activityId = `${baseUrl}/activitypub/likes/${uuid}`;
101
103
 
102
104
  // Construct and send Like activity
103
105
  const like = new Like({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-activitypub",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
5
5
  "keywords": [
6
6
  "indiekit",