Fix private post reference ap error
This commit is contained in:
parent
a783f195f4
commit
6f3ea2d767
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue