mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: always take the first post in the RSS fee
`.posts.first` may be the first post and may not, depending on luck Also add protection for corrupt topics
This commit is contained in:
@@ -23,7 +23,9 @@
|
||||
<p><%= t('author_wrote', author: link_to("@#{username}", "#{Discourse.base_url}/u/#{topic.user.username_lower}")).html_safe %></p>
|
||||
<% end %>
|
||||
<blockquote>
|
||||
<%= topic.posts.first.cooked.html_safe %>
|
||||
<%- if first_post = topic.ordered_posts.first %>
|
||||
<%= first_post.cooked.html_safe %>
|
||||
<%- end %>
|
||||
</blockquote>
|
||||
<p><%= t 'num_posts' %> <%= topic.posts_count %></p>
|
||||
<p><%= t 'num_participants' %> <%= topic.participant_count %></p>
|
||||
|
||||
Reference in New Issue
Block a user