From 6671b51169d2f691869d4b2ec249a35a0b08edf5 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 5 Mar 2024 14:52:52 -0500 Subject: [PATCH] fix: truthy check in notes.assert --- src/activitypub/notes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activitypub/notes.js b/src/activitypub/notes.js index f513043e7e..55bb4e906a 100644 --- a/src/activitypub/notes.js +++ b/src/activitypub/notes.js @@ -36,7 +36,7 @@ Notes.assert = async (uid, input, options = {}) => { const exists = await db.exists(key); winston.verbose(`[activitypub/notes.assert] Asserting note id ${id}`); - if (!exists || options.update === true) { + if (id && (!exists || options.update === true)) { let postData; winston.verbose(`[activitypub/notes.assert] Not found, retrieving note for persistence...`); if (activitypub.helpers.isUri(item)) {