From f3eb6d500ecee8dd64e7e14f96f7b7fd9f0a629e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 22 Aug 2024 15:19:24 -0400 Subject: [PATCH] fix: restrict announce activity to topic moving OUT of cid -1 --- src/api/activitypub.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/activitypub.js b/src/api/activitypub.js index 4800ea9690..396aa2c1b9 100644 --- a/src/api/activitypub.js +++ b/src/api/activitypub.js @@ -301,8 +301,8 @@ activitypubApi.announce = {}; activitypubApi.announce.note = enabledCheck(async (caller, { tid }) => { const { mainPid: pid, cid } = await topics.getTopicFields(tid, ['mainPid', 'cid']); - // Only remote posts can be announced - if (utils.isNumber(pid)) { + // Only remote posts can be announced to real categories + if (utils.isNumber(pid) || parseInt(cid, 10) === -1) { return; }