about summary refs log tree commit diff
path: root/app/serializers/activitypub
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-29 23:09:51 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-29 23:09:51 -0500
commit90130014dd27a909fda8a63d3ce520d4d31fd68c (patch)
tree567a2ce75e2102e810a98ece02ca83257e460911 /app/serializers/activitypub
parent0fb1e7888e8f2f83c8f1d6b19a44b6c079251a2e (diff)
add plain-text console formatting option
Diffstat (limited to 'app/serializers/activitypub')
-rw-r--r--app/serializers/activitypub/note_serializer.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb
index c4f1dac7f..56975ed80 100644
--- a/app/serializers/activitypub/note_serializer.rb
+++ b/app/serializers/activitypub/note_serializer.rb
@@ -40,7 +40,9 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
   end
 
   def source
-    { 'source' => object.proper.text, 'mediaType' => object.proper.content_type || 'text/plain' }
+    content_type = object.proper.content_type || 'text/plain'
+    content_type = 'text/plain+console' if content_type == 'text/console'
+    { 'source' => object.proper.text, 'mediaType' => content_type }
   end
 
   def content_map