From d5d0d3f0b63e6f5c197b93826b0a7b726f1972a2 Mon Sep 17 00:00:00 2001 From: Sebastian Webster Date: Wed, 11 Oct 2023 01:57:44 +1300 Subject: [PATCH] PollPost.processMultiplePostDataFromOneOwner now sends comment count --- libraries/PollPost.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/PollPost.js b/libraries/PollPost.js index eae62c48..6b077bd9 100644 --- a/libraries/PollPost.js +++ b/libraries/PollPost.js @@ -41,7 +41,8 @@ class PollPost { downvoted: !!isDownvoted, isOwner: postOwner._id.toString() === userRequesting._id.toString(), interacted: !!isUpvoted || !!isDownvoted, - votedFor: pollVote?.vote || "None" + votedFor: pollVote?.vote || "None", + comments: post.comments ? post.comments.length : 0 } if (isUpvoted) {