Ensure that we have the proper context for JSON-LD manipulation in DB.

This commit is contained in:
Andrew Pietila 2023-03-25 12:52:00 -05:00
parent 58adbdc459
commit 8ef2b9bd72

View file

@ -28,7 +28,11 @@ module.exports = {
origin: bodyParsed.object.attributedTo,
to: JSON.stringify(to),
cc: JSON.stringify(cc),
object: JSON.stringify(bodyParsed.object)
object: JSON.stringify(
await jsonld.compact(
await jsonld.expand(bodyParsed)[0]['https://www.w3.org/ns/activitystreams#object'], 'https://www.w3.org/ns/activitystreams'
)
)
});
res.status(204);
res.end();