activitypub: note serializer: begrudgingly serialize quotes using misskey quoteUrl

feature/quote
Ariadne Conill 2022-12-25 02:11:04 +00:00
parent b1bce9d193
commit 0990d5ac75
1 changed files with 5 additions and 1 deletions

View File

@ -9,7 +9,7 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
:in_reply_to, :published, :url, :in_reply_to, :published, :url,
:attributed_to, :to, :cc, :sensitive, :attributed_to, :to, :cc, :sensitive,
:atom_uri, :in_reply_to_atom_uri, :atom_uri, :in_reply_to_atom_uri,
:conversation :conversation, :quote_url
attribute :content attribute :content
attribute :content_map, if: :language? attribute :content_map, if: :language?
@ -149,6 +149,10 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
end end
end end
def quote_url
object.quote? ? ActivityPub::TagManager.instance.uri_for(object.quote) : nil
end
def local? def local?
object.account.local? object.account.local?
end end