Node.js based forum software built for the modern web
test: no idea how this passes on CI, add missng awaits
Barış Soner Uşaklı3339e421a8e8
diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.jsindex 5b7c14af0c..2469260961 100644--- a/src/activitypub/inbox.js+++ b/src/activitypub/inbox.js@@ -183,7 +183,7 @@ inbox.update = async (req) => {let { actor, object } = req.body;// Refetch object by id if Update was announce-wrapped- if (req.res.locals.apAnnounced) {+ if (req?.res?.locals?.apAnnounced) {try {const refetched = await activitypub.get('uid', 0, object.id);if (refetched) {diff --git a/test/activitypub/privileges.js b/test/activitypub/privileges.jsindex 4a5909a18a..f05b8dcebd 100644--- a/test/activitypub/privileges.js+++ b/test/activitypub/privileges.js@@ -145,7 +145,7 @@ describe('Privilege logic for remote users/content (ActivityPub)', () => {object: note,}));- assert.rejects(+ await assert.rejects(activitypub.inbox.update({ body: activity }),{ message: '[[error:no-privileges]]' },);@@ -180,7 +180,7 @@ describe('Privilege logic for remote users/content (ActivityPub)', () => {it('should ignore remote deletion of said note', async () => {({ activity } = helpers.mocks.delete({ object: note }));- assert.rejects(+ await assert.rejects(activitypub.inbox.delete({ body: activity }),{ message: '[[error:no-privileges]]' },);