Skip to content

Node.js based forum software built for the modern web

fix: additional logging for activities with no context property

Julian Lamcb5e5b4bdbe4
diff --git a/src/activitypub/contexts.js b/src/activitypub/contexts.js
index d955983aae..c84ac30bc8 100644
--- a/src/activitypub/contexts.js
+++ b/src/activitypub/contexts.js
@@ -15,6 +15,10 @@ Contexts.get = async (uid, id) => {
try {
({ context } = await activitypub.get('uid', uid, id));
+ if (!context) {
+ winston.verbose(`[activitypub/context] ${id} contains no context.`);
+ return false;
+ }
({ type } = await activitypub.get('uid', uid, context));
} catch (e) {
winston.verbose(`[activitypub/context] ${id} context not resolvable.`);