mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-03 09:46:24 +01:00
Fallback to old on-the-fly URI for follows/blocks if no stored URI (#7371)
Fix #7367
This commit is contained in:
parent
c7d1a2e400
commit
2f63d52b92
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user