fix: truthy check in notes.assert

This commit is contained in:
Julian Lam
2024-03-05 14:52:52 -05:00
parent aef1215fd6
commit 6671b51169

View File

@@ -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)) {