diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-26 03:45:14 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-26 03:45:14 +0100 |
commit | eb62778bec35e99eeadda1c77029142306ef1083 (patch) | |
tree | 1b63c2c7fc97f7e7af903aa3736fa2367005c182 /app/views/stream_entries | |
parent | 1c507ff17205e825e5f0b91fb44f4c4acdef8d2d (diff) |
Fix #537 - opengraph description should display spoiler text when present
Diffstat (limited to 'app/views/stream_entries')
-rw-r--r-- | app/views/stream_entries/show.html.haml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml index d106173d2..6bad45705 100644 --- a/app/views/stream_entries/show.html.haml +++ b/app/views/stream_entries/show.html.haml @@ -5,7 +5,11 @@ %meta{ property: 'og:site_name', content: 'Mastodon' }/ %meta{ property: 'og:type', content: 'article' }/ %meta{ property: 'og:title', content: "#{@account.username} on #{Rails.configuration.x.local_domain}" }/ - %meta{ property: 'og:description', content: @stream_entry.activity.content }/ + + - if @stream_entry.activity.is_a?(Status) && !@stream_entry.activity.spoiler_text.blank? + %meta{ property: 'og:description', content: @stream_entry.activity.spoiler_text }/ + - else + %meta{ property: 'og:description', content: @stream_entry.activity.content }/ - if @stream_entry.activity.is_a?(Status) && @stream_entry.activity.media_attachments.size > 0 %meta{ property: 'og:image', content: full_asset_url(@stream_entry.activity.media_attachments.first.file.url(:small)) }/ |