about summary refs log tree commit diff
path: root/app/serializers/rest/account_serializer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/rest/account_serializer.rb')
-rw-r--r--app/serializers/rest/account_serializer.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/rest/account_serializer.rb b/app/serializers/rest/account_serializer.rb
index 65fdb0308..bab944c5a 100644
--- a/app/serializers/rest/account_serializer.rb
+++ b/app/serializers/rest/account_serializer.rb
@@ -7,6 +7,10 @@ class REST::AccountSerializer < ActiveModel::Serializer
              :note, :url, :avatar, :avatar_static, :header, :header_static,
              :followers_count, :following_count, :statuses_count
 
+  has_one :moved_to_account, key: :moved, serializer: REST::AccountSerializer, if: :moved?
+
+  delegate :moved?, to: :object
+
   def id
     object.id.to_s
   end