Skip to content

Commit

Permalink
activitypub: note serializer: begrudgingly serialize quotes using mis…
Browse files Browse the repository at this point in the history
…skey quoteUrl
  • Loading branch information
kaniini committed Dec 25, 2022
1 parent b1bce9d commit 0990d5a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/serializers/activitypub/note_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
:in_reply_to, :published, :url,
:attributed_to, :to, :cc, :sensitive,
:atom_uri, :in_reply_to_atom_uri,
:conversation
:conversation, :quote_url

attribute :content
attribute :content_map, if: :language?
Expand Down Expand Up @@ -149,6 +149,10 @@ def conversation
end
end

def quote_url
object.quote? ? ActivityPub::TagManager.instance.uri_for(object.quote) : nil
end

def local?
object.account.local?
end
Expand Down

0 comments on commit 0990d5a

Please sign in to comment.