about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-09-14 13:50:30 +0200
committerClaire <claire.github-309c@sitedethib.com>2021-09-14 13:50:30 +0200
commitf1e6884d6bee3b4e426863c63c8d81e940d21a20 (patch)
tree66532e59f7ebfc0512af062c97291c46872be238 /app/serializers
parent7aa4d481db4ad5dfa65e5b28a5a83f643cea5763 (diff)
parent121c7a784718a18ad3789afcd9e546abfea09c6d (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/manifest_serializer.rb2
-rw-r--r--app/serializers/rest/media_attachment_serializer.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/serializers/manifest_serializer.rb b/app/serializers/manifest_serializer.rb
index dafe8f55b..4786aa760 100644
--- a/app/serializers/manifest_serializer.rb
+++ b/app/serializers/manifest_serializer.rb
@@ -48,7 +48,7 @@ class ManifestSerializer < ActiveModel::Serializer
   end
 
   def scope
-    root_url
+    '/'
   end
 
   def share_target
diff --git a/app/serializers/rest/media_attachment_serializer.rb b/app/serializers/rest/media_attachment_serializer.rb
index a24f95315..f27dda832 100644
--- a/app/serializers/rest/media_attachment_serializer.rb
+++ b/app/serializers/rest/media_attachment_serializer.rb
@@ -40,7 +40,7 @@ class REST::MediaAttachmentSerializer < ActiveModel::Serializer
   end
 
   def text_url
-    object.local? ? medium_url(object) : nil
+    object.local? && object.shortcode.present? ? medium_url(object) : nil
   end
 
   def meta