Merge commit 'ce1f35d7e213327549b960bb64f63c67a141ea40' into glitch-soc/merge-upstream
Conflicts: - `db/schema.rb`: Upstream regenerated the schema file using Rails 7, the conflicts are caused by our extra columns. Applied upstream's changes, but keeping our extra columns.
This commit is contained in:
@ -124,6 +124,7 @@ class LinkDetailsExtractor
|
||||
author_url: author_url || '',
|
||||
embed_url: embed_url || '',
|
||||
language: language,
|
||||
published_at: published_at.presence,
|
||||
}
|
||||
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
|
||||
|
Reference in New Issue
Block a user