Browse Source

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

Fix #7367
master
Eugen Rochko 6 years ago
committed by GitHub
parent
commit
2f63d52b92
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/serializers/activitypub/block_serializer.rb
  2. +1
    -1
      app/serializers/activitypub/follow_serializer.rb

+ 1
- 1
app/serializers/activitypub/block_serializer.rb 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

+ 1
- 1
app/serializers/activitypub/follow_serializer.rb 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

Loading…
Cancel
Save