diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-07-22 13:38:17 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-07-22 13:38:17 +0200 |
commit | b9f351d8455f672137a34ea0ea0b1050fba3464b (patch) | |
tree | 4a2dd275ddecf46760ccb8140fac5f6cb21ac766 /app/serializers/rest | |
parent | 801e546ecc1efb4103232d8265229eb455a8dd5b (diff) | |
parent | 5d9acc0ce41aa0274fef2dd321a8fad1fb0665ea (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - `app/javascript/mastodon/actions/compose.js`: Not a “real” conflict, but change too close to a change we made to fix the vanilla WebUI locally pushing authored local-only toots in the public TL view.
Diffstat (limited to 'app/serializers/rest')
-rw-r--r-- | app/serializers/rest/media_attachment_serializer.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/serializers/rest/media_attachment_serializer.rb b/app/serializers/rest/media_attachment_serializer.rb index e65f7acf1..a24f95315 100644 --- a/app/serializers/rest/media_attachment_serializer.rb +++ b/app/serializers/rest/media_attachment_serializer.rb @@ -4,7 +4,7 @@ class REST::MediaAttachmentSerializer < ActiveModel::Serializer include RoutingHelper attributes :id, :type, :url, :preview_url, - :remote_url, :text_url, :meta, + :remote_url, :preview_remote_url, :text_url, :meta, :description, :blurhash def id @@ -35,6 +35,10 @@ class REST::MediaAttachmentSerializer < ActiveModel::Serializer end end + def preview_remote_url + object.thumbnail_remote_url.presence + end + def text_url object.local? ? medium_url(object) : nil end |