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