about summary refs log tree commit diff
path: root/app/serializers/activitypub
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/activitypub')
-rw-r--r--app/serializers/activitypub/note_serializer.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb
index 87d7f9db0..75a38e9b5 100644
--- a/app/serializers/activitypub/note_serializer.rb
+++ b/app/serializers/activitypub/note_serializer.rb
@@ -12,6 +12,7 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
              :conversation
 
   attribute :updated
+  attribute :title, if: :title_present?
 
   attribute :content
   attribute :content_map, if: :language?
@@ -184,6 +185,10 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
     object.preloadable_poll&.voters_count
   end
 
+  def title_present?
+    object.title.present?
+  end
+
   class MediaAttachmentSerializer < ActivityPub::Serializer
     context_extensions :blurhash, :focal_point