Add "localOnly" property to created AP notes
Useful for third party clients doing feature detection.
This commit is contained in:
parent
6d1665ed64
commit
ad27ebf327
|
@ -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, :local_only
|
||||
|
||||
attribute :content
|
||||
attribute :content_map, if: :language?
|
||||
|
@ -108,6 +108,10 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
|
|||
object.account.sensitized? || object.sensitive
|
||||
end
|
||||
|
||||
def local_only
|
||||
object.local_only
|
||||
end
|
||||
|
||||
def virtual_attachments
|
||||
object.ordered_media_attachments
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue