mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: bug where remote post was attempted to be announced on post move
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user