From a7aeabc80d03d0ba76e96ab8654d6f5d410956f2 Mon Sep 17 00:00:00 2001 From: Opliko Date: Tue, 7 May 2024 10:40:47 +0200 Subject: [PATCH] fix: ensure consistent return type from notes.assert For fully cached topics it returned bare tid instead of a { tid, count } object. Typescript would fix this btw :) --- 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 d808f3abac..5a70c9cf3a 100644 --- a/src/activitypub/notes.js +++ b/src/activitypub/notes.js @@ -56,7 +56,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => { // All cached, return early. winston.verbose('[notes/assert] No new notes to process.'); unlock(id); - return tid; + return { tid, count: 0 }; } let cid;