diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-01-10 18:46:17 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-01-10 18:46:17 +0100 |
commit | fb0c906c717f2b21bb63610742a357850142b522 (patch) | |
tree | 696e649bcf15c2a7926e2d6d5f9e08f90aaef058 /app/serializers/activitypub/actor_serializer.rb | |
parent | d1da0a1086fa25f22739277fbf32ba1b3745317d (diff) |
Revert "Revert "Add handler for Move activity (#9629)""
This reverts commit bb96a7463758687f8187ae4483becd346c2482b3.
Diffstat (limited to 'app/serializers/activitypub/actor_serializer.rb')
-rw-r--r-- | app/serializers/activitypub/actor_serializer.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/serializers/activitypub/actor_serializer.rb b/app/serializers/activitypub/actor_serializer.rb index 72c30dc73..6746c1782 100644 --- a/app/serializers/activitypub/actor_serializer.rb +++ b/app/serializers/activitypub/actor_serializer.rb @@ -14,6 +14,7 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer has_many :virtual_attachments, key: :attachment attribute :moved_to, if: :moved? + attribute :also_known_as, if: :also_known_as? class EndpointsSerializer < ActiveModel::Serializer include RoutingHelper @@ -116,6 +117,10 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer ActivityPub::TagManager.instance.uri_for(object.moved_to_account) end + def also_known_as? + !object.also_known_as.empty? + end + class CustomEmojiSerializer < ActivityPub::EmojiSerializer end |