hide_followings was renamed to hide_followers in the FE, but never synced up in the BE

This was a dirty regex replace which worked on my server
This commit is contained in:
Mark Felder 2019-02-06 22:34:44 +00:00
commit 74518d0b60
9 changed files with 27 additions and 27 deletions

View file

@ -32,7 +32,7 @@ defmodule Pleroma.User.Info do
field(:hub, :string, default: nil)
field(:salmon, :string, default: nil)
field(:hide_followers, :boolean, default: false)
field(:hide_followings, :boolean, default: false)
field(:hide_follows, :boolean, default: false)
field(:pinned_activities, {:array, :string}, default: [])
# Found in the wild
@ -145,7 +145,7 @@ defmodule Pleroma.User.Info do
:no_rich_text,
:default_scope,
:banner,
:hide_followings,
:hide_follows,
:hide_followers,
:background,
:show_role

View file

@ -86,7 +86,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
query = from(user in query, select: [:ap_id])
following = Repo.all(query)
collection(following, "#{user.ap_id}/following", page, !user.info.hide_followings)
collection(following, "#{user.ap_id}/following", page, !user.info.hide_follows)
|> Map.merge(Utils.make_json_ld_header())
end
@ -99,7 +99,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
"id" => "#{user.ap_id}/following",
"type" => "OrderedCollection",
"totalItems" => length(following),
"first" => collection(following, "#{user.ap_id}/following", 1, !user.info.hide_followings)
"first" => collection(following, "#{user.ap_id}/following", 1, !user.info.hide_follows)
}
|> Map.merge(Utils.make_json_ld_header())
end

View file

@ -621,7 +621,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
followers =
cond do
for_user && user.id == for_user.id -> followers
user.info.hide_followings -> []
user.info.hide_follows -> []
true -> followers
end

View file

@ -523,7 +523,7 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
friends =
cond do
for_user && user.id == for_user.id -> friends
user.info.hide_followings -> []
user.info.hide_follows -> []
true -> friends
end
@ -618,7 +618,7 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
defp build_info_cng(user, params) do
info_params =
["no_rich_text", "locked", "hide_followers", "hide_followings", "show_role"]
["no_rich_text", "locked", "hide_followers", "hide_follows", "show_role"]
|> Enum.reduce(%{}, fn key, res ->
if value = params[key] do
Map.put(res, key, value == "true")

View file

@ -109,7 +109,7 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
"default_scope" => user.info.default_scope,
"no_rich_text" => user.info.no_rich_text,
"hide_followers" => user.info.hide_followers,
"hide_followings" => user.info.hide_followings,
"hide_follows" => user.info.hide_follows,
"fields" => fields,
# Pleroma extension