about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-01-19 00:22:45 -0600
committermultiple creatures <dev@multiple-creature.party>2020-01-19 00:22:45 -0600
commit9447566b8ed8e532c13dd97ecd53681029fdcec0 (patch)
tree2e0787da2664a861feb3c14d4cf9fb097130aea3 /app/serializers
parentf083ab1a272e8a0b77965aa430ae293f914cde95 (diff)
add chest floof to monsterfork api & outgoing federation
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/activitypub/actor_serializer.rb10
-rw-r--r--app/serializers/activitypub/note_serializer.rb8
-rw-r--r--app/serializers/rest/account_serializer.rb6
-rw-r--r--app/serializers/rest/status_serializer.rb7
4 files changed, 25 insertions, 6 deletions
diff --git a/app/serializers/activitypub/actor_serializer.rb b/app/serializers/activitypub/actor_serializer.rb
index 7297d7c42..a7260fa15 100644
--- a/app/serializers/activitypub/actor_serializer.rb
+++ b/app/serializers/activitypub/actor_serializer.rb
@@ -7,14 +7,16 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
 
   context_extensions :manually_approves_followers, :featured, :also_known_as,
                      :moved_to, :property_value, :hashtag, :emoji,
-                     :adult_content, :gently, :kobold, :froze, :big, :trans
+                     :adult_content, :gently, :kobold, :froze, :big, :trans,
+                     :chest
 
   attributes :id, :type, :following, :followers,
              :inbox, :outbox, :featured,
              :preferred_username, :name, :summary,
              :url, :manually_approves_followers,
              :gently, :kobold, :adult_content,
-             :froze, :tails_never_fail, :trans
+             :froze, :tails_never_fail, :trans,
+             :chest
 
   has_one :public_key, serializer: ActivityPub::PublicKeySerializer
 
@@ -45,6 +47,10 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
     'rights'
   end
 
+  def chest
+    'floof'
+  end
+
   def id
     account_url(object)
   end
diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb
index bc9fcacf4..3749fcd22 100644
--- a/app/serializers/activitypub/note_serializer.rb
+++ b/app/serializers/activitypub/note_serializer.rb
@@ -3,13 +3,13 @@
 class ActivityPub::NoteSerializer < ActivityPub::Serializer
   context_extensions :conversation, :sensitive, :big,
                      :hashtag, :emoji, :focal_point, :blurhash,
-                     :reject_replies, :trans
+                     :reject_replies, :trans, :chest
 
   attributes :id, :type, :summary,
              :in_reply_to, :published, :updated, :url,
              :attributed_to, :to, :cc, :sensitive,
              :conversation, :source, :tails_never_fail,
-             :reject_replies, :trans
+             :reject_replies, :trans, :chest
 
   attribute :content
   attribute :content_map, if: :language?
@@ -29,6 +29,10 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
     'rights'
   end
 
+  def chest
+    'floof'
+  end
+
   def id
     raise Mastodon::NotPermittedError, 'Local-only statuses should not be serialized' if object.local_only?
     ActivityPub::TagManager.instance.uri_for(object)
diff --git a/app/serializers/rest/account_serializer.rb b/app/serializers/rest/account_serializer.rb
index a8b905b16..5c1dc64dc 100644
--- a/app/serializers/rest/account_serializer.rb
+++ b/app/serializers/rest/account_serializer.rb
@@ -7,7 +7,7 @@ class REST::AccountSerializer < ActiveModel::Serializer
              :updated_at, :note, :url, :avatar, :avatar_static, :header,
              :header_static, :followers_count, :following_count, :statuses_count,
              :replies, :adult_content, :gently, :kobold, :role, :froze, :identity,
-             :limited, :signature, :trans
+             :limited, :signature, :trans, :chest
 
   has_one :moved_to_account, key: :moved, serializer: REST::AccountSerializer, if: :moved_and_not_nested?
   has_many :emojis, serializer: REST::CustomEmojiSerializer
@@ -26,6 +26,10 @@ class REST::AccountSerializer < ActiveModel::Serializer
     'rights'
   end
 
+  def chest
+    'floof'
+  end
+
   def id
     object.id.to_s
   end
diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb
index 0a98b2ecd..a071d2375 100644
--- a/app/serializers/rest/status_serializer.rb
+++ b/app/serializers/rest/status_serializer.rb
@@ -6,7 +6,8 @@ class REST::StatusSerializer < ActiveModel::Serializer
   attributes :id, :created_at, :updated_at, :in_reply_to_id,
              :in_reply_to_account_id, :sensitive, :spoiler_text, :visibility,
              :language, :uri, :url, :replies_count, :reblogs_count,
-             :favourites_count, :network, :curated, :reject_replies, :trans
+             :favourites_count, :network, :curated, :reject_replies, :trans,
+             :chest
 
   attribute :favourited, if: :current_user?
   attribute :reblogged, if: :current_user?
@@ -38,6 +39,10 @@ class REST::StatusSerializer < ActiveModel::Serializer
     'rights'
   end
 
+  def chest
+    'floof'
+  end
+
   def id
     object.id.to_s
   end