mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-16 11:53:13 +00:00
Fix #537 - opengraph description should display spoiler text when present
This commit is contained in:
parent
1c507ff172
commit
eb62778bec
|
@ -5,7 +5,11 @@
|
||||||
%meta{ property: 'og:site_name', content: 'Mastodon' }/
|
%meta{ property: 'og:site_name', content: 'Mastodon' }/
|
||||||
%meta{ property: 'og:type', content: 'article' }/
|
%meta{ property: 'og:type', content: 'article' }/
|
||||||
%meta{ property: 'og:title', content: "#{@account.username} on #{Rails.configuration.x.local_domain}" }/
|
%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
|
- 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)) }/
|
%meta{ property: 'og:image', content: full_asset_url(@stream_entry.activity.media_attachments.first.file.url(:small)) }/
|
||||||
|
|
Loading…
Reference in a new issue