diff options
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index b742dcc03..3ce89be3b 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -777,7 +777,14 @@ public end def public_response_events - self.info_request_events.select{|e| e.response? && e.incoming_message.all_can_view? } + condition = <<-SQL + info_request_events.event_type = ? + AND incoming_messages.prominence = ? + SQL + + info_request_events. + joins(:incoming_message). + where(condition, 'response', 'normal') end # The last public response is the default one people might want to reply to |