Fallback to old on-the-fly URI for follows/blocks if no stored URI (#7371)

Fix #7367
lolsob-rspec
Eugen Rochko 2018-05-05 23:07:51 +02:00 committed by GitHub
parent 0dcca6b6e8
commit 2ee5d518f1
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ class ActivityPub::BlockSerializer < ActiveModel::Serializer
attribute :virtual_object, key: :object
def id
[ActivityPub::TagManager.instance.uri_for(object.account), '#blocks/', object.id].join
ActivityPub::TagManager.instance.uri_for(object) || [ActivityPub::TagManager.instance.uri_for(object.account), '#blocks/', object.id].join
end
def type

View File

@ -5,7 +5,7 @@ class ActivityPub::FollowSerializer < ActiveModel::Serializer
attribute :virtual_object, key: :object
def id
ActivityPub::TagManager.instance.uri_for(object)
ActivityPub::TagManager.instance.uri_for(object) || [ActivityPub::TagManager.instance.uri_for(object.account), '#follows/', object.id].join
end
def type