mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: replies to remote content overriding mainPid in topic
This commit is contained in:
@@ -247,7 +247,7 @@ module.exports = function (Topics) {
|
||||
|
||||
Topics.addPostToTopic = async function (tid, postData) {
|
||||
const mainPid = await Topics.getTopicField(tid, 'mainPid');
|
||||
if (!parseInt(mainPid, 10)) {
|
||||
if (!mainPid) {
|
||||
await Topics.setTopicField(tid, 'mainPid', postData.pid);
|
||||
} else {
|
||||
const upvotes = parseInt(postData.upvotes, 10) || 0;
|
||||
|
||||
Reference in New Issue
Block a user