From 81e23191cff08cdd94e088ddcc3e48d0d84f5c09 Mon Sep 17 00:00:00 2001 From: Effy Elden Date: Tue, 20 Dec 2022 15:19:35 +1100 Subject: [PATCH] Use rich OEmbed content when it conforms to Mastodon's sanitization --- app/services/fetch_link_card_service.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index e5b5b730eca..46ca7d940c0 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -136,8 +136,13 @@ class FetchLinkCardService < BaseService @card.html = Sanitize.fragment(embed[:html], Sanitize::Config::MASTODON_OEMBED) @card.image_remote_url = (url + embed[:thumbnail_url]).to_s if embed[:thumbnail_url].present? when 'rich' - # Most providers rely on