Add _:inReplyToAtomUri to ActivityPub (#4702)
This commit is contained in:
@ -9,6 +9,7 @@ class ActivityPub::NoteSerializer < ActiveModel::Serializer
|
||||
has_many :virtual_tags, key: :tag
|
||||
|
||||
attribute :atom_uri, key: '_:atomUri', if: :local?
|
||||
attribute :in_reply_to_atom_uri, key: '_:inReplyToAtomUri'
|
||||
|
||||
def id
|
||||
ActivityPub::TagManager.instance.uri_for(object)
|
||||
@ -64,6 +65,12 @@ class ActivityPub::NoteSerializer < ActiveModel::Serializer
|
||||
::TagManager.instance.uri_for(object)
|
||||
end
|
||||
|
||||
def in_reply_to_atom_uri
|
||||
return unless object.reply?
|
||||
|
||||
::TagManager.instance.uri_for(object.thread)
|
||||
end
|
||||
|
||||
def local?
|
||||
object.account.local?
|
||||
end
|
||||
|
Reference in New Issue
Block a user