Add references activitypub support
This commit is contained in:
parent
4c65f2721c
commit
cadfbbab96
8 changed files with 115 additions and 5 deletions
|
@ -3,13 +3,13 @@
|
|||
class ActivityPub::NoteSerializer < ActivityPub::Serializer
|
||||
include FormattingHelper
|
||||
|
||||
context_extensions :atom_uri, :conversation, :sensitive, :voters_count, :searchable_by
|
||||
context_extensions :atom_uri, :conversation, :sensitive, :voters_count, :searchable_by, :references
|
||||
|
||||
attributes :id, :type, :summary,
|
||||
:in_reply_to, :published, :url,
|
||||
:attributed_to, :to, :cc, :sensitive,
|
||||
:atom_uri, :in_reply_to_atom_uri,
|
||||
:conversation, :searchable_by
|
||||
:conversation, :searchable_by, :references
|
||||
|
||||
attribute :content
|
||||
attribute :content_map, if: :language?
|
||||
|
@ -64,6 +64,10 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
|
|||
)
|
||||
end
|
||||
|
||||
def references
|
||||
ActivityPub::TagManager.instance.references_uri_for(object)
|
||||
end
|
||||
|
||||
def language?
|
||||
object.language.present?
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue