diff --git a/app/helpers/context_helper.rb b/app/helpers/context_helper.rb index 1677c2d02e..f7e74481b2 100644 --- a/app/helpers/context_helper.rb +++ b/app/helpers/context_helper.rb @@ -25,7 +25,7 @@ module ContextHelper memorial: { 'toot' => 'http://joinmastodon.org/ns#', 'memorial' => 'toot:memorial' }, voters_count: { 'toot' => 'http://joinmastodon.org/ns#', 'votersCount' => 'toot:votersCount' }, suspended: { 'toot' => 'http://joinmastodon.org/ns#', 'suspended' => 'toot:suspended' }, - attribution_domains: { 'toot' => 'http://joinmastodon.org/ns#', 'attributionDomains' => { '@id' => 'toot:attributionDomains', '@type' => '@id' } }, + attribution_domains: { 'toot' => 'http://joinmastodon.org/ns#', 'attributionDomains' => { '@id' => 'toot:attributionDomains', '@container' => '@set' } }, profile_settings: { 'toot' => 'http://joinmastodon.org/ns#', 'showFeatured' => 'toot:showFeatured', diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index e616400c93..d4b38162a8 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -150,7 +150,7 @@ class ActivityPub::ProcessAccountService < BaseService @account.show_featured = @json['showFeatured'] if @json.key?('showFeatured') @account.show_media = @json['showMedia'] if @json.key?('showMedia') @account.show_media_replies = @json['showRepliesInMedia'] if @json.key?('showRepliesInMedia') - @account.attribution_domains = as_array(@json['attributionDomains'] || []).take(Account::ATTRIBUTION_DOMAINS_HARD_LIMIT).map { |item| value_or_id(item) } + @account.attribution_domains = as_array(@json['attributionDomains'] || []).take(Account::ATTRIBUTION_DOMAINS_HARD_LIMIT).filter { |item| item.is_a?(String) } end def set_fetchable_key!