Node.js based forum software built for the modern web
refactor: dont need exist check, if post doesnt exist getPostData returns null
Barış Soner Uşaklıb2d03da96db1
diff --git a/src/activitypub/notes.js b/src/activitypub/notes.jsindex da377b4c53..228bde68d3 100644--- a/src/activitypub/notes.js+++ b/src/activitypub/notes.js@@ -244,9 +244,8 @@ Notes.getParentChain = async (uid, input) => {return await traverse(uid, localId);}- const exists = await db.exists(`post:${id}`);- if (exists) {- const postData = await posts.getPostData(id);+ const postData = await posts.getPostData(id);+ if (postData) {chain.add(postData);if (postData.toPid) {await traverse(uid, postData.toPid);