feat: additional logic to handle special case where a queried object id reports a context, but it is not actually contained in the resolved context's collection

This commit is contained in:
Julian Lam
2024-07-19 11:06:19 -04:00
parent 2aa0483718
commit f9937a84c4
2 changed files with 20 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
const { tid } = context;
return { tid, count: 0 };
} else if (context.context) {
chain = Array.from(await activitypub.contexts.getItems(uid, context.context));
chain = Array.from(await activitypub.contexts.getItems(uid, context.context, { input }));
} else {
// Fall back to inReplyTo traversal
chain = Array.from(await Notes.getParentChain(uid, input));