diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-12-29 02:24:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-29 02:24:36 +0100 |
commit | 0f938ff29c2e9bf92e3eb9c23be8d4ba3a1b97f7 (patch) | |
tree | a7f9cb2672014b95f77f1a9fe802009f889574e0 /app/serializers | |
parent | 9b475a4838abc6143e26776816280e16abfc6193 (diff) |
Add handler for Move activity (#9629)
Diffstat (limited to 'app/serializers')
-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 |