fix: restrict announce activity to topic moving OUT of cid -1

This commit is contained in:
Julian Lam
2024-08-22 15:19:24 -04:00
parent e3bfcb0230
commit f3eb6d500e

View File

@@ -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;
}