mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 10:45:57 +00:00
Merge pull request #3450 from techAPJ/patch-3
FIX: reply count is off by one
This commit is contained in:
commit
1b3f3fa437
@ -21,7 +21,7 @@ class EmbedController < ApplicationController
|
|||||||
@second_post_url = "#{@topic_view.topic.url}/2" if @topic_view
|
@second_post_url = "#{@topic_view.topic.url}/2" if @topic_view
|
||||||
@posts_left = 0
|
@posts_left = 0
|
||||||
if @topic_view && @topic_view.posts.size == SiteSetting.embed_post_limit
|
if @topic_view && @topic_view.posts.size == SiteSetting.embed_post_limit
|
||||||
@posts_left = @topic_view.topic.posts_count - SiteSetting.embed_post_limit
|
@posts_left = @topic_view.topic.posts_count - SiteSetting.embed_post_limit - 1
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Jobs.enqueue(:retrieve_topic, user_id: current_user.try(:id), embed_url: embed_url)
|
Jobs.enqueue(:retrieve_topic, user_id: current_user.try(:id), embed_url: embed_url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user