fix: logic derp

This commit is contained in:
Julian Lam
2024-02-06 15:20:30 -05:00
parent 00efbd6dd9
commit 9795abbf58

View File

@@ -59,7 +59,7 @@ inbox.update = async (req) => {
inbox.like = async (req) => { inbox.like = async (req) => {
const { actor, object } = req.body; const { actor, object } = req.body;
const { type, id } = await activitypub.helpers.resolveLocalId(object); const { type, id } = await activitypub.helpers.resolveLocalId(object);
if (type !== 'post' || await posts.exists(id)) { if (type !== 'post' || !(await posts.exists(id))) {
throw new Error('[[error:activitypub.invalid-id]]'); throw new Error('[[error:activitypub.invalid-id]]');
} }