% @messages.each do |message| %>
<%= message.sender&.try(:available_name) || message.sender&.name || '' %>
|
<% if message.content %>
<%= CommonMarker.render_html(message.content).html_safe %>
<% end %>
<% if message.attachments %>
<% message.attachments.each do |attachment| %>
Attachment [Click here to view]
<% end %>
<% end %>
|
<% end %>