Skip to content

Node.js based forum software built for the modern web

fix: double-OP issue when remote reply comes in to local mainPid

Julian Lam0a2482cf51fa
diff --git a/src/activitypub/notes.js b/src/activitypub/notes.js
index 8b9318b08e..32563f7626 100644
--- a/src/activitypub/notes.js
+++ b/src/activitypub/notes.js
@@ -92,7 +92,7 @@ Notes.getParentChain = async (uid, input) => {
await traverse(uid, postData.toPid);
} else if (utils.isNumber(id)) { // local pid without toPid, could be OP or reply to OP
const mainPid = await topics.getTopicField(postData.tid, 'mainPid');
- if (mainPid !== id) {
+ if (mainPid !== parseInt(id, 10)) {
await traverse(uid, mainPid);
}
}