mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: truthy check in notes.assert
This commit is contained in:
@@ -36,7 +36,7 @@ Notes.assert = async (uid, input, options = {}) => {
|
|||||||
const exists = await db.exists(key);
|
const exists = await db.exists(key);
|
||||||
winston.verbose(`[activitypub/notes.assert] Asserting note id ${id}`);
|
winston.verbose(`[activitypub/notes.assert] Asserting note id ${id}`);
|
||||||
|
|
||||||
if (!exists || options.update === true) {
|
if (id && (!exists || options.update === true)) {
|
||||||
let postData;
|
let postData;
|
||||||
winston.verbose(`[activitypub/notes.assert] Not found, retrieving note for persistence...`);
|
winston.verbose(`[activitypub/notes.assert] Not found, retrieving note for persistence...`);
|
||||||
if (activitypub.helpers.isUri(item)) {
|
if (activitypub.helpers.isUri(item)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user