diff --git a/src/api/posts.js b/src/api/posts.js index dbdec5817d..a7111e0c22 100644 --- a/src/api/posts.js +++ b/src/api/posts.js @@ -322,9 +322,11 @@ postsAPI.move = async function (caller, data) { if (!postDeleted && !topicDeleted) { socketHelpers.sendNotificationToPostOwner(data.pid, caller.uid, 'move', 'notifications:moved-your-post'); - // ideally we should federate a "move" activity instead. tbd - const { activity } = await activitypub.mocks.activities.create(data.pid, caller.uid); - await activitypub.feps.announce(data.pid, activity); + // ideally we should federate a "move" activity instead, then can capture remote posts too. tbd + if (utils.isNumber(data.pid)) { + const { activity } = await activitypub.mocks.activities.create(data.pid, caller.uid); + await activitypub.feps.announce(data.pid, activity); + } } };