Node.js based forum software built for the modern web
fix: handle resolved objects in flag
Opliko41f77f8f1bf4
diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.jsindex 1ccf4adbd7..42f1dccbf0 100644--- a/src/activitypub/inbox.js+++ b/src/activitypub/inbox.js@@ -360,15 +360,14 @@ inbox.undo = async (req) => {inbox.flag = async (req) => {const { actor, object, content } = req.body;const objects = Array.isArray(object) ? object : [object];- const subjects = await Promise.all(objects.map(helpers.resolveLocalId));// Check if the actor is validif (!await activitypub.actors.assert(actor)) {return reject('Flag', objects, actor);}- await Promise.all(subjects.map(async (subject, index) => {- const { type, id } = subject;+ await Promise.all(objects.map(async (subject, index) => {+ const { type, id } = await activitypub.helpers.resolveLocalId(subject.id);try {await flags.create(type, id, actor, content);} catch (e) {