diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-07 17:43:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-07 17:43:42 +0200 |
commit | 3a3475450e46f670e8beaf4bf804b820ad39a5f9 (patch) | |
tree | 60600a840e74668818db64d5d55be2f4a0601fb3 /app/serializers/activitypub/note_serializer.rb | |
parent | 057db0ecd0049c76c113cbe5412e098d686f0700 (diff) |
Encode custom emojis as resolveable objects in ActivityPub (#5243)
* Encode custom emojis as resolveable objects in ActivityPub * Improve code style
Diffstat (limited to 'app/serializers/activitypub/note_serializer.rb')
-rw-r--r-- | app/serializers/activitypub/note_serializer.rb | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index 4dbf6a444..24c39f3c9 100644 --- a/app/serializers/activitypub/note_serializer.rb +++ b/app/serializers/activitypub/note_serializer.rb @@ -142,21 +142,6 @@ class ActivityPub::NoteSerializer < ActiveModel::Serializer end end - class CustomEmojiSerializer < ActiveModel::Serializer - include RoutingHelper - - attributes :type, :href, :name - - def type - 'Emoji' - end - - def href - full_asset_url(object.image.url) - end - - def name - ":#{object.shortcode}:" - end + class CustomEmojiSerializer < ActivityPub::EmojiSerializer end end |