From 89bdf9b5351acaf439a22b70fd0aeaf54cb0fb96 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 27 Aug 2025 14:50:13 -0400 Subject: [PATCH] This is only used with statuses --- app/views/statuses/_og_image.html.haml | 4 ++-- app/views/statuses/show.html.haml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/statuses/_og_image.html.haml b/app/views/statuses/_og_image.html.haml index 1ae97adff67..1f7f57f1562 100644 --- a/app/views/statuses/_og_image.html.haml +++ b/app/views/statuses/_og_image.html.haml @@ -1,6 +1,6 @@ -- if activity.is_a?(Status) && (activity.non_sensitive_with_media? || (activity.with_media? && Setting.preview_sensitive_media)) +- if status.non_sensitive_with_media? || (status.with_media? && Setting.preview_sensitive_media) - player_card = false - - activity.ordered_media_attachments.each do |media| + - status.ordered_media_attachments.each do |media| - if media.image? = opengraph 'og:image', full_asset_url(media.file.url(:original)) = opengraph 'og:image:type', media.file_content_type diff --git a/app/views/statuses/show.html.haml b/app/views/statuses/show.html.haml index cc779f4370e..679ce79da64 100644 --- a/app/views/statuses/show.html.haml +++ b/app/views/statuses/show.html.haml @@ -17,6 +17,6 @@ = opengraph 'profile:username', acct(@account)[1..] = render 'og_description', activity: @status - = render 'og_image', activity: @status, account: @account + = render 'og_image', status: @status, account: @account = render 'shared/web_app'