fix: remove special-case logic that added a requested object to a topic if its defined context didn't actually contain it

This commit is contained in:
Julian Lam
2025-08-25 10:11:09 -04:00
parent ae7fa6958d
commit 70d7e32929

View File

@@ -113,19 +113,6 @@ Contexts.getItems = async (uid, id, options) => {
return chain;
}
// Handle special case where originating object is not actually part of the context collection
const inputId = activitypub.helpers.isUri(options.input) ? options.input : options.input.id;
const inCollection = Array.from(chain).map(p => p.pid).includes(inputId);
if (!inCollection) {
const item = activitypub.helpers.isUri(options.input) ?
await parseString(uid, options.input) :
await parseItem(uid, options.input);
if (item) {
chain.add(item);
}
}
return chain;
};