Add _:inReplyToAtomUri to ActivityPub (#4702)
This commit is contained in:
parent
0397c58b61
commit
0d5d11eeff
4 changed files with 27 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue