about summary refs log tree commit diff
path: root/app/views/stream_entries/_detailed_status.html.haml
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-01-04 11:40:02 +0100
committerGitHub <noreply@github.com>2019-01-04 11:40:02 +0100
commit664bb7bb72e18b88231bd2235c053cfd47db13c2 (patch)
treea938b2bd94f94b14ce8a4234a36db4872198fef4 /app/views/stream_entries/_detailed_status.html.haml
parentd5bdfaf0bb91d89bd29a6507dd7c9a7a6adfd7ca (diff)
Add preview cards to non-detailed statuses on public pages (#9714)
Diffstat (limited to 'app/views/stream_entries/_detailed_status.html.haml')
-rw-r--r--app/views/stream_entries/_detailed_status.html.haml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml
index 6e6d0eda8..b30729970 100644
--- a/app/views/stream_entries/_detailed_status.html.haml
+++ b/app/views/stream_entries/_detailed_status.html.haml
@@ -28,8 +28,8 @@
       = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, width: 670, height: 380, detailed: true, inline: true, alt: video.description
     - else
       = react_component :media_gallery, height: 380, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, standalone: true, 'autoPlayGif': current_account&.user&.setting_auto_play_gif || autoplay, 'reduceMotion': current_account&.user&.setting_reduce_motion, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }
-  - elsif status.preview_cards.first
-    = react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_cards.first, serializer: REST::PreviewCardSerializer).as_json
+  - elsif status.preview_card
+    = react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_card, serializer: REST::PreviewCardSerializer).as_json
 
   .detailed-status__meta
     %data.dt-published{ value: status.created_at.to_time.iso8601 }