@rmdes/indiekit-endpoint-activitypub 2.15.3 → 2.15.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.
@@ -216,7 +216,7 @@ export function submitComposeController(mountPath, plugin) {
216
216
  }
217
217
 
218
218
  if (cwEnabled && summary && summary.trim()) {
219
- micropubData.append("summary", summary.trim());
219
+ micropubData.append("content-warning", summary.trim());
220
220
  micropubData.append("sensitive", "true");
221
221
  }
222
222
 
package/lib/jf2-to-as2.js CHANGED
@@ -171,6 +171,12 @@ export function jf2ToActivityStreams(properties, actorUrl, publicationUrl, optio
171
171
  object.sensitive = true;
172
172
  }
173
173
 
174
+ // Content warning text for Mastodon CW display
175
+ if (properties["content-warning"]) {
176
+ object.summary = properties["content-warning"];
177
+ object.sensitive = true;
178
+ }
179
+
174
180
  if (properties["in-reply-to"]) {
175
181
  object.inReplyTo = properties["in-reply-to"];
176
182
  }
@@ -337,9 +343,9 @@ export function jf2ToAS2Activity(properties, actorUrl, publicationUrl, options =
337
343
  if (properties["post-status"] === "sensitive") {
338
344
  noteOptions.sensitive = true;
339
345
  }
340
- // Summary doubles as CW text in Mastodon (notes only — articles already use summary for description)
341
- if (properties.summary && !isArticle) {
342
- noteOptions.summary = properties.summary;
346
+ // Content warning text for Mastodon CW display
347
+ if (properties["content-warning"]) {
348
+ noteOptions.summary = properties["content-warning"];
343
349
  noteOptions.sensitive = true;
344
350
  }
345
351
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-activitypub",
3
- "version": "2.15.3",
3
+ "version": "2.15.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",