mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: don't throw on unknown post on Undo(Like)
This commit is contained in:
@@ -546,7 +546,8 @@ inbox.undo = async (req) => {
|
|||||||
case 'Like': {
|
case 'Like': {
|
||||||
const exists = await posts.exists(id);
|
const exists = await posts.exists(id);
|
||||||
if (localType !== 'post' || !exists) {
|
if (localType !== 'post' || !exists) {
|
||||||
throw new Error('[[error:invalid-pid]]');
|
reject('Like', object, actor);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const allowed = await privileges.posts.can('posts:upvote', id, activitypub._constants.uid);
|
const allowed = await privileges.posts.can('posts:upvote', id, activitypub._constants.uid);
|
||||||
|
|||||||
Reference in New Issue
Block a user