Change design of link previews in web UI (#26136)
This commit is contained in:
parent
4d01d1a1ee
commit
6b2952d1dd
7 changed files with 90 additions and 99 deletions
|
@ -6,7 +6,7 @@ class REST::PreviewCardSerializer < ActiveModel::Serializer
|
|||
attributes :url, :title, :description, :language, :type,
|
||||
:author_name, :author_url, :provider_name,
|
||||
:provider_url, :html, :width, :height,
|
||||
:image, :embed_url, :blurhash
|
||||
:image, :embed_url, :blurhash, :published_at
|
||||
|
||||
def image
|
||||
object.image? ? full_asset_url(object.image.url(:original)) : nil
|
||||
|
@ -15,4 +15,8 @@ class REST::PreviewCardSerializer < ActiveModel::Serializer
|
|||
def html
|
||||
Sanitize.fragment(object.html, Sanitize::Config::MASTODON_OEMBED)
|
||||
end
|
||||
|
||||
def published_at
|
||||
object.created_at
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue