Add discoverable_local setting

This commit is contained in:
KMY 2023-08-09 13:21:54 +09:00
parent 88339b3657
commit 790ffc1e4e
7 changed files with 25 additions and 1 deletions

View file

@ -96,6 +96,14 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
end
def discoverable
if object.local?
object.user&.setting_discoverable_local ? false : original_discoverable
else
original_discoverable
end
end
def original_discoverable
object.suspended? ? false : (object.discoverable || false)
end