Merge commit '072112867b9a3ec090ad2c92d6363b47b2265d74' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2023-09-02 11:41:40 +02:00
34 changed files with 686 additions and 137 deletions
@@ -8,13 +8,13 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
context_extensions :manually_approves_followers, :featured, :also_known_as,
:moved_to, :property_value, :discoverable, :olm, :suspended,
:memorial
:memorial, :indexable
attributes :id, :type, :following, :followers,
:inbox, :outbox, :featured, :featured_tags,
:preferred_username, :name, :summary,
:url, :manually_approves_followers,
:discoverable, :published, :memorial
:discoverable, :indexable, :published, :memorial
has_one :public_key, serializer: ActivityPub::PublicKeySerializer
@@ -99,6 +99,10 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
object.suspended? ? false : (object.discoverable || false)
end
def indexable
object.suspended? ? false : (object.indexable || false)
end
def name
object.suspended? ? object.username : (object.display_name.presence || object.username)
end