Node.js based forum software built for the modern web
Merge branch 'master' into develop
Barış Soner Uşaklı15d152fde4f5
diff --cc src/activitypub/actors.jsindex 4cefb91b64,e3c6da54fe..0ebceb46b6--- a/src/activitypub/actors.js+++ b/src/activitypub/actors.js@@@ -323,13 -320,14 +326,16 @@@ Actors.assertGroup = async (ids, optionqualifyGroup: true,...options,});- if (ids === false) {- return ids;+ if (!qualified || !qualified.ids) {+ return qualified;}+ if (!ids.length) {+ return true;+ }- activitypub.helpers.log(`[activitypub/actors] Asserting ${ids.length} group(s)`);+ const { ids: idsArr } = qualified;++ activitypub.helpers.log(`[activitypub/actors] Asserting ${idsArr.length} group(s)`);// NOTE: MAKE SURE EVERY DB ADDITION HAS A CORRESPONDING REMOVAL IN ACTORS.REMOVEGROUP!diff --cc test/activitypub/actors.jsindex 9f585fd829,9402aae24c..5860eba653--- a/test/activitypub/actors.js+++ b/test/activitypub/actors.js@@@ -20,14 -20,8 +20,15 @@@ const helpers = require('./helpers')describe('as:Person (Actor asserton)', () => {before(async () => {meta.config.activitypubEnabled = 1;+ meta.config.activitypubAllowLoopback = 1;await install.giveWorldPrivileges();++ // Prevent real outbound requests (serve objects from the AP cache)+ helpers.mocks.mockRequests();+ });++ after(() => {+ helpers.mocks.restoreRequests();});describe('happy path', () => {@@@ -222,12 -216,8 +223,13 @@@});describe('as:Group', () => {- before(async () => {+ before(() => {+ meta.config.activitypubAllowLoopback = 1;+ helpers.mocks.mockRequests();+ });++ after(() => {+ helpers.mocks.restoreRequests();});describe('assertion', () => {