From fc30b771cf2ad6b848eae529a16c2236e5bf99a9 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Mon, 11 May 2015 13:56:21 +0530 Subject: [PATCH] FIX: reply count is off by one --- app/controllers/embed_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/embed_controller.rb b/app/controllers/embed_controller.rb index 4eaaa4c3782..033d47a18a2 100644 --- a/app/controllers/embed_controller.rb +++ b/app/controllers/embed_controller.rb @@ -21,7 +21,7 @@ class EmbedController < ApplicationController @second_post_url = "#{@topic_view.topic.url}/2" if @topic_view @posts_left = 0 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 else Jobs.enqueue(:retrieve_topic, user_id: current_user.try(:id), embed_url: embed_url)