Add published_at
attribute to preview cards (#26153)
This commit is contained in:
@@ -124,7 +124,7 @@ class LinkDetailsExtractor
|
||||
author_url: author_url || '',
|
||||
embed_url: embed_url || '',
|
||||
language: language,
|
||||
created_at: published_at.presence || Time.now.utc,
|
||||
published_at: published_at.presence,
|
||||
}
|
||||
end
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
# max_score_at :datetime
|
||||
# trendable :boolean
|
||||
# link_type :integer
|
||||
# published_at :datetime
|
||||
#
|
||||
|
||||
class PreviewCard < ApplicationRecord
|
||||
|
@@ -15,8 +15,4 @@ class REST::PreviewCardSerializer < ActiveModel::Serializer
|
||||
def html
|
||||
Sanitize.fragment(object.html, Sanitize::Config::MASTODON_OEMBED)
|
||||
end
|
||||
|
||||
def published_at
|
||||
object.created_at
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user