@rmdes/indiekit-endpoint-activitypub 2.0.3 → 2.0.4

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.
@@ -195,9 +195,14 @@ export function submitComposeController(mountPath, plugin) {
195
195
  { handle, publicationUrl: plugin._publicationUrl },
196
196
  );
197
197
 
198
- const noteId = `urn:uuid:${crypto.randomUUID()}`;
198
+ const uuid = crypto.randomUUID();
199
+ const baseUrl = plugin._publicationUrl.replace(/\/$/, "");
200
+ const noteId = `${baseUrl}/activitypub/quick-replies/${uuid}`;
199
201
  const actorUri = ctx.getActorUri(handle);
200
202
 
203
+ const publicAddress = new URL(
204
+ "https://www.w3.org/ns/activitystreams#Public",
205
+ );
201
206
  const followersUri = ctx.getFollowersUri(handle);
202
207
  const note = new Note({
203
208
  id: new URL(noteId),
@@ -205,7 +210,7 @@ export function submitComposeController(mountPath, plugin) {
205
210
  content: content.trim(),
206
211
  inReplyTo: inReplyTo ? new URL(inReplyTo) : undefined,
207
212
  published: Temporal.Now.instant(),
208
- to: new URL("https://www.w3.org/ns/activitystreams#Public"),
213
+ to: publicAddress,
209
214
  cc: followersUri,
210
215
  });
211
216
 
@@ -213,6 +218,8 @@ export function submitComposeController(mountPath, plugin) {
213
218
  id: new URL(`${noteId}#activity`),
214
219
  actor: actorUri,
215
220
  object: note,
221
+ to: publicAddress,
222
+ cc: followersUri,
216
223
  });
217
224
 
218
225
  // Send to followers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-activitypub",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
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",