Fix other_setting merging values
This commit is contained in:
parent
062da7f31d
commit
6735a422ab
1 changed files with 8 additions and 11 deletions
|
@ -172,9 +172,9 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
|
||||||
end
|
end
|
||||||
|
|
||||||
def other_setting
|
def other_setting
|
||||||
hash = []
|
config = { 'noindex' => object.noindex?, 'noai' => object.noai?, 'hide_network' => object.hide_collections }
|
||||||
if object.settings.present?
|
config.merge(object.settings) if object.settings.present?
|
||||||
hash = object.settings.map do |k, v|
|
config.map do |k, v|
|
||||||
{
|
{
|
||||||
type: 'PropertyValue',
|
type: 'PropertyValue',
|
||||||
name: k,
|
name: k,
|
||||||
|
@ -182,9 +182,6 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
hash << { type: 'PropertyValue', name: 'noindex', value: object.noindex? }
|
|
||||||
hash << { type: 'PropertyValue', name: 'noai', value: object.noai? }
|
|
||||||
end
|
|
||||||
|
|
||||||
class CustomEmojiSerializer < ActivityPub::EmojiSerializer
|
class CustomEmojiSerializer < ActivityPub::EmojiSerializer
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue