Add fedibird hide followers count support
This commit is contained in:
parent
56245f4ef8
commit
9818f6a0e1
10 changed files with 31 additions and 6 deletions
|
@ -117,6 +117,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
@account.discoverable = @json['discoverable'] || false
|
||||
@account.searchability = searchability_from_audience
|
||||
@account.dissubscribable = !subscribable(@account.note)
|
||||
@account.settings = other_settings
|
||||
end
|
||||
|
||||
def set_fetchable_key!
|
||||
|
@ -265,6 +266,12 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
end
|
||||
end
|
||||
|
||||
def other_settings
|
||||
return {} unless @json['otherSetting'].is_a?(Array)
|
||||
|
||||
@json['otherSetting'].each_with_object({}) { |v, h| h.merge!({ v['name'] => v['value'] }) if v['type'] == 'PropertyValue' }
|
||||
end
|
||||
|
||||
def property_values
|
||||
return unless @json['attachment'].is_a?(Array)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue