Merge commit '90ec88d58b' into kb_migration

This commit is contained in:
KMY 2023-08-15 18:20:19 +09:00
commit 993bced956
5 changed files with 22 additions and 1 deletions

View file

@ -20,6 +20,7 @@ module ContextHelper
focal_point: { 'toot' => 'http://joinmastodon.org/ns#', 'focalPoint' => { '@container' => '@list', '@id' => 'toot:focalPoint' } },
blurhash: { 'toot' => 'http://joinmastodon.org/ns#', 'blurhash' => 'toot:blurhash' },
discoverable: { 'toot' => 'http://joinmastodon.org/ns#', 'discoverable' => 'toot:discoverable' },
indexable: { 'toot' => 'http://joinmastodon.org/ns#', 'indexable' => 'toot:indexable' },
voters_count: { 'toot' => 'http://joinmastodon.org/ns#', 'votersCount' => 'toot:votersCount' },
emoji_reactions: { 'fedibird' => 'http://fedibird.com/ns#', 'emojiReactions' => { '@id' => 'fedibird:emojiReactions', '@type' => '@id' } },
searchable_by: { 'fedibird' => 'http://fedibird.com/ns#', 'searchableBy' => { '@id' => 'fedibird:searchableBy', '@type' => '@id' } },

View file

@ -54,6 +54,7 @@
# searchability :integer default("direct"), not null
# dissubscribable :boolean default(FALSE), not null
# settings :jsonb
# indexable :boolean default(FALSE), not null
#
class Account < ApplicationRecord

View file

@ -123,6 +123,7 @@ class ActivityPub::ProcessAccountService < BaseService
@account.fields = property_values || {}
@account.also_known_as = as_array(@json['alsoKnownAs'] || []).map { |item| value_or_id(item) }
@account.discoverable = @json['discoverable'] || false
@account.indexable = @json['indexable'] || false
@account.searchability = searchability_from_audience
@account.dissubscribable = !subscribable(@account.note)
@account.settings = other_settings