Fix private post reference ap error

This commit is contained in:
KMY 2023-07-21 18:23:30 +09:00
parent a783f195f4
commit 6f3ea2d767

View file

@ -9,7 +9,9 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
:in_reply_to, :published, :url,
:attributed_to, :to, :cc, :sensitive,
:atom_uri, :in_reply_to_atom_uri,
:conversation, :searchable_by, :references
:conversation, :searchable_by
attribute :references, if: :not_private_post?
attribute :content
attribute :content_map, if: :language?
@ -150,6 +152,10 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
object.account.local?
end
def not_private_post?
!object.private_visibility?
end
def poll_options
object.preloadable_poll.loaded_options
end