feat: update Remove(Context) to use target instead of origin, federate out Move(Context) on topic move between local cids

This commit is contained in:
Julian Lam
2025-10-22 15:04:47 -04:00
parent 3ede64d8a1
commit d02e188a5f
4 changed files with 49 additions and 13 deletions

View File

@@ -86,14 +86,12 @@ inbox.remove = async (req) => {
if (!isContext) {
return; // don't know how to handle other types
}
console.log('isContext?', isContext);
const mainPid = await activitypub.contexts.getItems(0, object.id, { returnRootId: true });
const exists = await posts.exists(mainPid);
if (!exists) {
return; // post not cached; do nothing.
}
console.log('mainPid is', mainPid);
// Ensure that cid is same-origin as the actor
const tid = await posts.getPostField(mainPid, 'tid');