diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-29 23:09:51 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-29 23:09:51 -0500 |
commit | 90130014dd27a909fda8a63d3ce520d4d31fd68c (patch) | |
tree | 567a2ce75e2102e810a98ece02ca83257e460911 /app/serializers/activitypub | |
parent | 0fb1e7888e8f2f83c8f1d6b19a44b6c079251a2e (diff) |
add plain-text console formatting option
Diffstat (limited to 'app/serializers/activitypub')
-rw-r--r-- | app/serializers/activitypub/note_serializer.rb | 4 |
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 |