@rmdes/indiekit-endpoint-activitypub 3.3.0 → 3.4.0

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.
@@ -214,9 +214,15 @@ router.post("/api/v1/statuses", async (req, res, next) => {
214
214
  jf2["mp-language"] = language;
215
215
  }
216
216
 
217
+ // Syndicate to AP only — posts from Mastodon clients belong to the fediverse.
218
+ // Never cross-post to Bluesky (conversations stay in their protocol).
219
+ // The publication URL is the AP syndicator's uid.
220
+ const publicationUrl = pluginOptions.publicationUrl || baseUrl;
221
+ jf2["mp-syndicate-to"] = [publicationUrl.replace(/\/$/, "") + "/"];
222
+
217
223
  // Create post via Micropub pipeline (same functions the Micropub endpoint uses)
218
224
  // postData.create() handles: normalization, post type detection, path rendering,
219
- // mp-syndicate-to auto-set (from checked syndicators), MongoDB posts collection
225
+ // mp-syndicate-to validated against configured syndicators, MongoDB posts collection
220
226
  const { postData } = await import("@indiekit/endpoint-micropub/lib/post-data.js");
221
227
  const { postContent } = await import("@indiekit/endpoint-micropub/lib/post-content.js");
222
228
 
@@ -230,7 +236,6 @@ router.post("/api/v1/statuses", async (req, res, next) => {
230
236
  // Add to ap_timeline so the post is visible in the Mastodon Client API
231
237
  const profile = await collections.ap_profile.findOne({});
232
238
  const handle = pluginOptions.handle || "user";
233
- const publicationUrl = pluginOptions.publicationUrl || baseUrl;
234
239
  const actorUrl = profile?.url || `${publicationUrl}/users/${handle}`;
235
240
 
236
241
  const now = new Date().toISOString();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-activitypub",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
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",