0
0
Fork 0

Minor ActivityPub JSON fixes (#4214)

- Objects must have attributedTo instead of actor
- The current attribute belongs to CollectionPage, not Collection
This commit is contained in:
Eugen Rochko 2017-07-16 10:28:55 +02:00 committed by GitHub
parent 35b868eeca
commit a6328fc1b1
7 changed files with 4 additions and 9 deletions

View file

@ -3,7 +3,7 @@
class ActivityPub::NoteSerializer < ActiveModel::Serializer
attributes :id, :type, :summary, :content,
:in_reply_to, :published, :url,
:actor, :to, :cc, :sensitive
:attributed_to, :to, :cc, :sensitive
has_many :media_attachments, key: :attachment
has_many :virtual_tags, key: :tag
@ -36,7 +36,7 @@ class ActivityPub::NoteSerializer < ActiveModel::Serializer
ActivityPub::TagManager.instance.url_for(object)
end
def actor
def attributed_to
ActivityPub::TagManager.instance.uri_for(object.account)
end