Fix local collection uri not being serialized in REST API responses (#38645)
This commit is contained in:
parent
3b39562954
commit
8124d44ee1
@ -13,6 +13,10 @@ class REST::CollectionSerializer < ActiveModel::Serializer
|
||||
object.id.to_s
|
||||
end
|
||||
|
||||
def uri
|
||||
ActivityPub::TagManager.instance.uri_for(object)
|
||||
end
|
||||
|
||||
def description
|
||||
return object.description if object.local?
|
||||
return if object.description_html.nil?
|
||||
|
||||
@ -29,6 +29,7 @@ RSpec.describe REST::CollectionSerializer do
|
||||
expect(subject)
|
||||
.to include(
|
||||
'account_id' => collection.account_id.to_s,
|
||||
'uri' => include('2342'),
|
||||
'id' => '2342',
|
||||
'name' => 'Exquisite follows',
|
||||
'description' => 'Always worth a follow',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user