Node.js based forum software built for the modern web
fix: restrict announce activity to topic moving OUT of cid -1
Julian Lamf3eb6d500ece
diff --git a/src/api/activitypub.js b/src/api/activitypub.jsindex 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;}