mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 16:41:21 +01:00
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:
@@ -113,19 +113,6 @@ Contexts.getItems = async (uid, id, options) => {
|
|||||||
return chain;
|
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;
|
return chain;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user