Node.js based forum software built for the modern web
Merge branch 'master' into develop
Julian Lamb6d9abd1edec
diff --cc src/activitypub/contexts.jsindex 7ca954e097,b6cb1890e6..0748e42ece--- a/src/activitypub/contexts.js+++ b/src/activitypub/contexts.js@@@ -58,9 -55,21 +58,21 @@@ Contexts.getItems = async (uid, id, optoptions.root = true;}- activitypub.helpers.log(`[activitypub/context] Retrieving context ${id}`);- let { type, items, orderedItems, first, next } = await activitypub.get('uid', uid, id);+ // Page object instead of id+ let object;+ if (!id && options.object) {+ object = options.object;+ } else {+ activitypub.helpers.log(`[activitypub/context] Retrieving context/page ${id}`);+ try {+ object = await activitypub.get('uid', uid, id);+ } catch (e) {+ return false;+ }+ }+ let { type, items, orderedItems, first, next } = object;+- if (!acceptableTypes.includes(type)) {+ if (!activitypub._constants.acceptable.contextTypes.has(type)) {return false;}