Skip to content
Snippets Groups Projects
Commit 37fdddd9 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Rename "locked" to "manuallyApprovesFollowers" in ActivityPub (#4779)

parent 6ec1aa37
No related branches found
No related tags found
No related merge requests found
......@@ -7,14 +7,13 @@ class ActivityPub::Adapter < ActiveModelSerializers::Adapter::Base
'https://w3id.org/security/v1',
{
'locked' => 'as:locked',
'sensitive' => 'as:sensitive',
'Hashtag' => 'as:Hashtag',
'ostatus' => 'http://ostatus.org#',
'atomUri' => 'ostatus:atomUri',
'inReplyToAtomUri' => 'ostatus:inReplyToAtomUri',
'conversation' => 'ostatus:conversation',
'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers',
'sensitive' => 'as:sensitive',
'Hashtag' => 'as:Hashtag',
'ostatus' => 'http://ostatus.org#',
'atomUri' => 'ostatus:atomUri',
'inReplyToAtomUri' => 'ostatus:inReplyToAtomUri',
'conversation' => 'ostatus:conversation',
},
],
}.freeze
......
......@@ -6,7 +6,7 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
attributes :id, :type, :following, :followers,
:inbox, :outbox, :shared_inbox,
:preferred_username, :name, :summary,
:url, :locked
:url, :manually_approves_followers
has_one :public_key, serializer: ActivityPub::PublicKeySerializer
......@@ -90,4 +90,8 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
def header_exists?
object.header.exists?
end
def manually_approves_followers
object.locked
end
end
......@@ -50,7 +50,7 @@ class ActivityPub::ProcessAccountService < BaseService
@account.avatar_remote_url = image_url('icon')
@account.header_remote_url = image_url('image')
@account.public_key = public_key || ''
@account.locked = @json['locked'] || false
@account.locked = @json['manuallyApprovesFollowers'] || false
@account.save!
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment