@rmdes/indiekit-endpoint-activitypub 2.15.1 → 2.15.2
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.
- package/README.md +17 -0
- package/lib/federation-bridge.js +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -339,6 +339,23 @@ Mastodon's `update_account_fields` checks `attachment.is_a?(Array)` and silently
|
|
|
339
339
|
|
|
340
340
|
**Revisit when:** Fedify adds an option to preserve arrays during JSON-LD serialization, or Mastodon fixes their array check.
|
|
341
341
|
|
|
342
|
+
### Endpoints `as:Endpoints` Type Stripping
|
|
343
|
+
|
|
344
|
+
**File:** `lib/federation-bridge.js` (in `sendFedifyResponse()`)
|
|
345
|
+
**Upstream issue:** [fedify#576](https://github.com/fedify-dev/fedify/issues/576) — FIXED in Fedify 2.1.0
|
|
346
|
+
|
|
347
|
+
Fedify serializes the `endpoints` object with `"type": "as:Endpoints"`, which is not a valid ActivityStreams type. browser.pub rejects this. The bridge strips the `type` field from the `endpoints` object before sending.
|
|
348
|
+
|
|
349
|
+
**Remove when:** Upgrading to Fedify ≥ 2.1.0.
|
|
350
|
+
|
|
351
|
+
### PropertyValue Attachment Type (Known Issue)
|
|
352
|
+
|
|
353
|
+
**Upstream issue:** [fedify#629](https://github.com/fedify-dev/fedify/issues/629) — OPEN
|
|
354
|
+
|
|
355
|
+
Fedify serializes `PropertyValue` attachments (used by Mastodon for profile metadata fields) with `"type": "PropertyValue"`, a schema.org type that is not a valid AS2 Object or Link. browser.pub rejects `/attachment` as invalid. However, every Mastodon-compatible server emits `PropertyValue` — removing it would break profile field display across the fediverse.
|
|
356
|
+
|
|
357
|
+
**No workaround applied.** This is a de facto fediverse standard despite not being in the AS2 vocabulary.
|
|
358
|
+
|
|
342
359
|
### `.authorize()` Not Chained on Actor Dispatcher
|
|
343
360
|
|
|
344
361
|
**File:** `lib/federation-setup.js` (line ~254)
|
package/lib/federation-bridge.js
CHANGED
|
@@ -89,6 +89,12 @@ async function sendFedifyResponse(res, response, request) {
|
|
|
89
89
|
if (json.attachment && !Array.isArray(json.attachment)) {
|
|
90
90
|
json.attachment = [json.attachment];
|
|
91
91
|
}
|
|
92
|
+
// WORKAROUND: Fedify serializes endpoints with "type": "as:Endpoints"
|
|
93
|
+
// which is not a valid AS2 type. The endpoints object should be a plain
|
|
94
|
+
// object with just sharedInbox/proxyUrl etc. Strip the invalid type.
|
|
95
|
+
if (json.endpoints && json.endpoints.type) {
|
|
96
|
+
delete json.endpoints.type;
|
|
97
|
+
}
|
|
92
98
|
const patched = JSON.stringify(json);
|
|
93
99
|
res.setHeader("content-length", Buffer.byteLength(patched));
|
|
94
100
|
res.end(patched);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmdes/indiekit-endpoint-activitypub",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.2",
|
|
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",
|