diff options
Diffstat (limited to 'app')
-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 |