diff --git a/lib/federation-bridge.js b/lib/federation-bridge.js index 1295745..5b39051 100644 --- a/lib/federation-bridge.js +++ b/lib/federation-bridge.js @@ -89,6 +89,12 @@ async function sendFedifyResponse(res, response, request) { if (json.attachment && !Array.isArray(json.attachment)) { json.attachment = [json.attachment]; } + // WORKAROUND: Fedify serializes endpoints with "type": "as:Endpoints" + // which is not a valid AS2 type. The endpoints object should be a plain + // object with just sharedInbox/proxyUrl etc. Strip the invalid type. + if (json.endpoints && json.endpoints.type) { + delete json.endpoints.type; + } const patched = JSON.stringify(json); res.setHeader("content-length", Buffer.byteLength(patched)); res.end(patched);