diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-19 15:43:59 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-19 17:03:15 -0500 |
commit | 6d07ba50f31f82633019b62dc83ec7099e3926b3 (patch) | |
tree | 7d3d329b88c60a04d3aee35e71d932203fc73ba4 /app/serializers/activitypub | |
parent | 3fda862ea004c1c417a442b2a8f38a67d0535979 (diff) |
keep `locked` badge for approves-followers + add `frozen` badge for admin-locked accts, also federate `frozen` state
Diffstat (limited to 'app/serializers/activitypub')
-rw-r--r-- | app/serializers/activitypub/actor_serializer.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/serializers/activitypub/actor_serializer.rb b/app/serializers/activitypub/actor_serializer.rb index 95110bfc2..85d2482db 100644 --- a/app/serializers/activitypub/actor_serializer.rb +++ b/app/serializers/activitypub/actor_serializer.rb @@ -7,14 +7,14 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer context_extensions :manually_approves_followers, :featured, :also_known_as, :moved_to, :property_value, :hashtag, :emoji, :identity_proof, - :adult_content, :gently, :kobold, :supports_chat, :locked + :adult_content, :gently, :kobold, :supports_chat, :froze attributes :id, :type, :following, :followers, :inbox, :outbox, :featured, :preferred_username, :name, :summary, :url, :manually_approves_followers, :gently, :kobold, :adult_content, - :supports_chat, :locked + :supports_chat, :froze has_one :public_key, serializer: ActivityPub::PublicKeySerializer @@ -113,6 +113,10 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer object.locked end + def froze + object.local? ? (object&.user.nil? ? true : object.user.disabled?) : object.froze? + end + def virtual_tags object.emojis + object.tags end |