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

This commit is contained in:
Julian Lam
2024-03-14 13:28:54 -04:00
parent 7aa56c727b
commit 0a2482cf51

View File

@@ -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);
}
}