feat: handle receipt of Add activity #12707

This commit is contained in:
Julian Lam
2024-10-24 14:36:37 -04:00
parent 6f237c57cd
commit 3023b25172
3 changed files with 21 additions and 2 deletions

View File

@@ -388,7 +388,7 @@ activitypubApi.add = enabledCheck((async (_, { pid }) => {
const tid = await posts.getPostField(localId || pid, 'tid');
const cid = await posts.getCidByPid(localId || pid);
if (cid <= 0) {
if (!utils.isNumber(tid) || cid <= 0) { // `Add` only federated on categorized topics started locally
return;
}