about summary refs log tree commit diff
path: root/app/serializers/activitypub
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-05-04 02:04:47 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:22 -0500
commit545330dc657e78ee17bb58b094328054380eeb4f (patch)
tree9cd3340a9b9bd74c62c933bbf0c5f13cd2570bdd /app/serializers/activitypub
parenta7015f920203a4c62cb325b869890d988068e92b (diff)
federate raw versions of roars using `source` prop
Diffstat (limited to 'app/serializers/activitypub')
-rw-r--r--app/serializers/activitypub/note_serializer.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb
index 67f596e78..0fe7b0524 100644
--- a/app/serializers/activitypub/note_serializer.rb
+++ b/app/serializers/activitypub/note_serializer.rb
@@ -8,7 +8,7 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
              :in_reply_to, :published, :url,
              :attributed_to, :to, :cc, :sensitive,
              :atom_uri, :in_reply_to_atom_uri,
-             :conversation
+             :conversation, :source
 
   attribute :content
   attribute :content_map, if: :language?
@@ -40,6 +40,10 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
     Formatter.instance.format(object)
   end
 
+  def source
+    { 'source' => object.proper.text, 'mediaType' => 'text/plain' }
+  end
+
   def content_map
     { object.language => Formatter.instance.format(object) }
   end