mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
fix: remove unused param in addParentPosts
This commit is contained in:
@@ -232,7 +232,7 @@ module.exports = function (Topics) {
|
||||
] = await Promise.all([
|
||||
posts.getUserInfoForPosts([postData.uid], uid),
|
||||
Topics.getTopicFields(tid, ['tid', 'uid', 'title', 'slug', 'cid', 'postcount', 'mainPid', 'scheduled', 'tags']),
|
||||
Topics.addParentPosts([postData], uid),
|
||||
Topics.addParentPosts([postData]),
|
||||
Topics.syncBacklinks(postData),
|
||||
posts.parsePost(postData),
|
||||
]);
|
||||
|
||||
@@ -129,7 +129,7 @@ module.exports = function (Topics) {
|
||||
getPostUserData('uid', async uids => await posts.getUserInfoForPosts(uids, uid)),
|
||||
getPostUserData('editor', async uids => await user.getUsersFields(uids, ['uid', 'username', 'userslug'])),
|
||||
getPostReplies(postData, uid),
|
||||
Topics.addParentPosts(postData, uid),
|
||||
Topics.addParentPosts(postData),
|
||||
]);
|
||||
|
||||
postData.forEach((postObj, i) => {
|
||||
@@ -178,7 +178,7 @@ module.exports = function (Topics) {
|
||||
});
|
||||
};
|
||||
|
||||
Topics.addParentPosts = async function (postData, uid) {
|
||||
Topics.addParentPosts = async function (postData) {
|
||||
let parentPids = postData
|
||||
.filter(p => p && p.hasOwnProperty('toPid') && (activitypub.helpers.isUri(p.toPid) || utils.isNumber(p.toPid)))
|
||||
.map(postObj => postObj.toPid);
|
||||
|
||||
Reference in New Issue
Block a user