federate raw versions of roars using `source` prop

staging
multiple creatures 2019-05-04 02:04:47 -05:00
parent a7015f9202
commit 545330dc65
1 changed files with 5 additions and 1 deletions

View File

@ -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