diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-01-08 10:57:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-08 10:57:52 +0100 |
commit | dbda87c31f7d7ede7312ba422940841d8c96c171 (patch) | |
tree | 281593f9871d93329fdaf0f2337ee0ced23540b9 /app/serializers | |
parent | e4a241abefaa68492938c3fbb7e5e5401d12138e (diff) |
Revert #5772 (#6221)
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/activitypub/follow_serializer.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/app/serializers/activitypub/follow_serializer.rb b/app/serializers/activitypub/follow_serializer.rb index eecd64701..86c9992fe 100644 --- a/app/serializers/activitypub/follow_serializer.rb +++ b/app/serializers/activitypub/follow_serializer.rb @@ -1,12 +1,11 @@ # frozen_string_literal: true class ActivityPub::FollowSerializer < ActiveModel::Serializer - attributes :type, :actor - attribute :id, if: :dereferencable? + attributes :id, :type, :actor attribute :virtual_object, key: :object def id - ActivityPub::TagManager.instance.uri_for(object) + [ActivityPub::TagManager.instance.uri_for(object.account), '#follows/', object.id].join end def type @@ -20,8 +19,4 @@ class ActivityPub::FollowSerializer < ActiveModel::Serializer def virtual_object ActivityPub::TagManager.instance.uri_for(object.target_account) end - - def dereferencable? - object.respond_to?(:object_type) - end end |