mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
fix: restrict announce activity to topic moving OUT of cid -1
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user