diff --git a/app/serializers/activitypub/block_serializer.rb b/app/serializers/activitypub/block_serializer.rb index b3bd9f868e..624ce2fce8 100644 --- a/app/serializers/activitypub/block_serializer.rb +++ b/app/serializers/activitypub/block_serializer.rb @@ -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 diff --git a/app/serializers/activitypub/follow_serializer.rb b/app/serializers/activitypub/follow_serializer.rb index 24dfe96f89..bb204ee8f3 100644 --- a/app/serializers/activitypub/follow_serializer.rb +++ b/app/serializers/activitypub/follow_serializer.rb @@ -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