Mastodon API: Add a setting to hide follow/follower count from the user view (hide_follows_count and hide_followers_count)

This commit is contained in:
eugenijm 2019-09-13 17:37:30 +03:00
commit 450bf7a63c
9 changed files with 117 additions and 21 deletions

View file

@ -41,6 +41,8 @@ defmodule Pleroma.User.Info do
field(:topic, :string, default: nil)
field(:hub, :string, default: nil)
field(:salmon, :string, default: nil)
field(:hide_followers_count, :boolean, default: false)
field(:hide_follows_count, :boolean, default: false)
field(:hide_followers, :boolean, default: false)
field(:hide_follows, :boolean, default: false)
field(:hide_favorites, :boolean, default: true)
@ -262,6 +264,8 @@ defmodule Pleroma.User.Info do
:salmon,
:hide_followers,
:hide_follows,
:hide_followers_count,
:hide_follows_count,
:follower_count,
:fields,
:following_count
@ -281,7 +285,9 @@ defmodule Pleroma.User.Info do
:following_count,
:hide_follows,
:fields,
:hide_followers
:hide_followers,
:hide_followers_count,
:hide_follows_count
])
|> validate_fields(remote?)
end
@ -295,6 +301,8 @@ defmodule Pleroma.User.Info do
:banner,
:hide_follows,
:hide_followers,
:hide_followers_count,
:hide_follows_count,
:hide_favorites,
:background,
:show_role,
@ -458,7 +466,9 @@ defmodule Pleroma.User.Info do
:hide_followers,
:hide_follows,
:follower_count,
:following_count
:following_count,
:hide_followers_count,
:hide_follows_count
])
end
end