about summary refs log tree commit diff
path: root/app/serializers/activitypub
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-07-25 01:53:36 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:15 -0500
commit17ce7abdb87dc3a4bd174a293e64ef393d80e6fb (patch)
treede50abed4b6460743814335e138b3beb1c6615cf /app/serializers/activitypub
parentd6f8631cb191038bc81a6537f03e18400cdcee37 (diff)
[Bug] Treat as Article if a title field is present
Diffstat (limited to 'app/serializers/activitypub')
-rw-r--r--app/serializers/activitypub/note_serializer.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb
index da77414ca..fd40d1f50 100644
--- a/app/serializers/activitypub/note_serializer.rb
+++ b/app/serializers/activitypub/note_serializer.rb
@@ -40,7 +40,13 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
   end
 
   def type
-    object.preloadable_poll ? 'Question' : 'Note'
+    if object.preloadable_poll
+      'Question'
+    elsif title_present?
+      'Article'
+    else
+      'Note'
+    end
   end
 
   def summary