From cb5e5b4bdbe40d0b20eb6c8e185079ed266d2254 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 4 Jul 2024 17:00:30 -0400 Subject: [PATCH] fix: additional logging for activities with no context property --- src/activitypub/contexts.js | 4 ++++ 1 file changed, 4 insertions(+) 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.`);