diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-05-04 02:04:47 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:22 -0500 |
commit | 545330dc657e78ee17bb58b094328054380eeb4f (patch) | |
tree | 9cd3340a9b9bd74c62c933bbf0c5f13cd2570bdd /app/serializers | |
parent | a7015f920203a4c62cb325b869890d988068e92b (diff) |
federate raw versions of roars using `source` prop
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/activitypub/note_serializer.rb | 6 |
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 |