about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/lib/activitypub/adapter.rb4
-rw-r--r--app/serializers/activitypub/actor_serializer.rb8
-rw-r--r--app/serializers/activitypub/note_serializer.rb8
3 files changed, 16 insertions, 4 deletions
diff --git a/app/lib/activitypub/adapter.rb b/app/lib/activitypub/adapter.rb
index e3a6c57eb..73e2f271b 100644
--- a/app/lib/activitypub/adapter.rb
+++ b/app/lib/activitypub/adapter.rb
@@ -20,6 +20,10 @@ class ActivityPub::Adapter < ActiveModelSerializers::Adapter::Base
     identity_proof: { 'toot' => 'http://joinmastodon.org/ns#', 'IdentityProof' => 'toot:IdentityProof' },
     blurhash: { 'toot' => 'http://joinmastodon.org/ns#', 'blurhash' => 'toot:blurhash' },
 
+    big: {
+      'Big' => 'https://tails.monsterpit.net/#',
+      'tailsNeverFail' => 'Big:tailsNeverFail',
+    },
     adult_content: {
       'mp' => 'https://monsterpit.net/ns#',
       'adultContent' => 'mp:adultContent'
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