Add "localOnly" property to created AP notes

Useful for third party clients doing feature detection.
This commit is contained in:
Darius Kazemi 2023-01-02 12:10:09 -08:00
parent 6d1665ed64
commit ad27ebf327
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,
: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