Change link previews to keep original URL from the status (#27312)
This commit is contained in:
@@ -8,6 +8,10 @@ class REST::PreviewCardSerializer < ActiveModel::Serializer
|
||||
:provider_url, :html, :width, :height,
|
||||
:image, :image_description, :embed_url, :blurhash, :published_at
|
||||
|
||||
def url
|
||||
object.original_url.presence || object.url
|
||||
end
|
||||
|
||||
def image
|
||||
object.image? ? full_asset_url(object.image.url(:original)) : nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user