mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36: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) {
|
if (!postDeleted && !topicDeleted) {
|
||||||
socketHelpers.sendNotificationToPostOwner(data.pid, caller.uid, 'move', 'notifications:moved-your-post');
|
socketHelpers.sendNotificationToPostOwner(data.pid, caller.uid, 'move', 'notifications:moved-your-post');
|
||||||
|
|
||||||
// ideally we should federate a "move" activity instead. tbd
|
// ideally we should federate a "move" activity instead, then can capture remote posts too. tbd
|
||||||
const { activity } = await activitypub.mocks.activities.create(data.pid, caller.uid);
|
if (utils.isNumber(data.pid)) {
|
||||||
await activitypub.feps.announce(data.pid, activity);
|
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