Fix `NoMethodError` in `ActivityPub::FetchFeaturedTagsCollectionService` (#37806)

pull/37814/head
Claire 2 weeks ago committed by GitHub
parent f3347b1c67
commit 040555be7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -18,6 +18,8 @@ class ActivityPub::FetchFeaturedTagsCollectionService < BaseService
private
def process_items(items)
return if items.nil?
names = items.filter_map { |item| item['type'] == 'Hashtag' && item['name']&.delete_prefix('#') }.take(FeaturedTag::LIMIT)
tags = names.index_by { |name| HashtagNormalizer.new.normalize(name) }
normalized_names = tags.keys

Loading…
Cancel
Save