Change design of link previews in web UI (#26136)

This commit is contained in:
Eugen Rochko
2023-07-24 13:47:28 +02:00
committed by GitHub
parent 4d01d1a1ee
commit 6b2952d1dd
7 changed files with 90 additions and 99 deletions

View File

@@ -124,6 +124,7 @@ class LinkDetailsExtractor
author_url: author_url || '',
embed_url: embed_url || '',
language: language,
created_at: published_at,
}
end
@@ -159,6 +160,10 @@ class LinkDetailsExtractor
html_entities.decode(structured_data&.description || opengraph_tag('og:description') || meta_tag('description'))
end
def published_at
structured_data&.date_published || opengraph_tag('article:published_time')
end
def image
valid_url_or_nil(opengraph_tag('og:image'))
end