about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-28 22:39:05 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-28 22:39:54 -0500
commit90d72f19bae6188dfd4ec54f81e239f2a2a341fe (patch)
tree6ab2ad5fc603c06a34d58a97f27a7c638a8057ab /app/serializers
parent965b713ac22eaca99e17b3e82731b7301e63edb5 (diff)
big tails never fail!
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/activitypub/actor_serializer.rb8
-rw-r--r--app/serializers/activitypub/note_serializer.rb8
2 files changed, 12 insertions, 4 deletions
diff --git a/app/serializers/activitypub/actor_serializer.rb b/app/serializers/activitypub/actor_serializer.rb
index 5ca962291..4cafe27e9 100644
--- a/app/serializers/activitypub/actor_serializer.rb
+++ b/app/serializers/activitypub/actor_serializer.rb
@@ -7,14 +7,14 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
 
   context_extensions :manually_approves_followers, :featured, :also_known_as,
                      :moved_to, :property_value, :hashtag, :emoji, :identity_proof,
-                     :adult_content, :gently, :kobold, :froze
+                     :adult_content, :gently, :kobold, :froze, :big
 
   attributes :id, :type, :following, :followers,
              :inbox, :outbox, :featured,
              :preferred_username, :name, :summary,
              :url, :manually_approves_followers,
              :gently, :kobold, :adult_content,
-             :froze
+             :froze, :tails_never_fail
 
   has_one :public_key, serializer: ActivityPub::PublicKeySerializer
 
@@ -133,6 +133,10 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
     !object.also_known_as.empty?
   end
 
+  def tails_never_fail
+    true
+  end
+
   class CustomEmojiSerializer < ActivityPub::EmojiSerializer
   end
 
diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb
index 460a7ba7e..c4f1dac7f 100644
--- a/app/serializers/activitypub/note_serializer.rb
+++ b/app/serializers/activitypub/note_serializer.rb
@@ -1,13 +1,13 @@
 # frozen_string_literal: true
 
 class ActivityPub::NoteSerializer < ActivityPub::Serializer
-  context_extensions :conversation, :sensitive,
+  context_extensions :conversation, :sensitive, :big,
                      :hashtag, :emoji, :focal_point, :blurhash
 
   attributes :id, :type, :summary,
              :in_reply_to, :published, :url,
              :attributed_to, :to, :cc, :sensitive,
-             :conversation, :source
+             :conversation, :source, :tails_never_fail
 
   attribute :content
   attribute :content_map, if: :language?
@@ -141,6 +141,10 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
     object.preloadable_poll&.expired?
   end
 
+  def tails_never_fail
+    true
+  end
+
   class MediaAttachmentSerializer < ActivityPub::Serializer
     include RoutingHelper