i need some help i will i am trying to access to api /latest.json but the replies column is not matching why is that you can see it in the screenshots replies are 1 and in the api json is 0 am i missing something ?
Could you send a screenshot of the posts in the topic?
Thanks.
reply_count
parameter refers to direct replies to the post.
The
reply_count
on a topic is the total number of direct replies to posts in that topic. It is not the total number of posts in the topic.
@Lilly thanks Lily but in the json how to get the total reply number as you can see in my forum? if the json file as you can see none of those fields belong to reply?
topic replies would be post_count - 1
For finding the total number of comments in a topic, look at the topic’s
posts_count
value.
What version of the app are you on? We’ve updated our topic map:
I highly recommend updating your site.
Separately for your question:
reply_count
in json refers to a specific reply to a post, e.g. clicking on this particular reply button below the post:
whereas replies is essentially a count of every reply from the OP (topic / first post).
Using this meta topic’s json as an example:
https://meta.discourse.org/t/why-isnt-discourse-more-frequently-recommended-as-a-community-platform/221040.json
if you notice, post number 1 has 3 direct replies even though the topic has many replies.
The gist of it is a “reply_count” is the number of replies to a post, and it doesn’t indicate how many replies a topic has.