mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Show quote replies when filtering (#11483)
Only applies when using the `enable_filtered_replies_view` site setting. The filter query was not accounting for quote replies.
This commit is contained in:
@@ -773,10 +773,12 @@ class TopicView
|
||||
|
||||
# Filter replies
|
||||
if @replies_to_post_number.present?
|
||||
post_id = filtered_post_id(@replies_to_post_number.to_i)
|
||||
@filtered_posts = @filtered_posts.where('
|
||||
posts.post_number = 1
|
||||
OR posts.post_number = :post_number
|
||||
OR posts.reply_to_post_number = :post_number', { post_number: @replies_to_post_number.to_i })
|
||||
OR posts.reply_to_post_number = :post_number
|
||||
OR posts.id IN (SELECT pr.reply_post_id FROM post_replies pr WHERE pr.post_id = :post_id)', { post_number: @replies_to_post_number.to_i, post_id: post_id })
|
||||
|
||||
@contains_gaps = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user