about summary refs log tree commit diff
path: root/app/views/stream_entries/show.html.haml
diff options
context:
space:
mode:
authorAnthony Bellew <anthonyreflected@gmail.com>2017-01-25 20:53:57 -0700
committerGitHub <noreply@github.com>2017-01-25 20:53:57 -0700
commit3d890c407356c8e0e7dd9b64e8e232ededcff8e8 (patch)
treea22df9a8737250f97a6024943af3445a163917b3 /app/views/stream_entries/show.html.haml
parentfebe2449bb14f3d877fb934ceb6d52e320712bac (diff)
parent905c82917959a5afe24cb85c62c0b0ba13f0da8b (diff)
Merge pull request #3 from tootsuite/master
Updating to current
Diffstat (limited to 'app/views/stream_entries/show.html.haml')
-rw-r--r--app/views/stream_entries/show.html.haml8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml
index 43935da60..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)) }/
@@ -14,5 +18,7 @@
     %meta{ property: 'og:image:width', content: '120' }/
     %meta{ property: 'og:image:height', content: '120' }/
 
+  %meta{ property: 'twitter:card', content: 'summary' }/
+
 .activity-stream.activity-stream-headless
   = render partial: @type, locals: { @type.to_sym => @stream_entry.activity, include_threads: true }