mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 00:09:35 +00:00
Finish undoing API breakage
This commit is contained in:
parent
3242cfef20
commit
b001237b79
|
@ -110,7 +110,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
|
|||
"endpoints" => endpoints,
|
||||
"attachment" => fields,
|
||||
"tag" => emoji_tags,
|
||||
"is_discoverable" => user.is_discoverable,
|
||||
"discoverable" => user.is_discoverable,
|
||||
"capabilities" => capabilities
|
||||
}
|
||||
|> Map.merge(maybe_make_image(&User.avatar_url/2, "icon", user))
|
||||
|
|
|
@ -186,7 +186,6 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
|
|||
:show_role,
|
||||
:skip_thread_containment,
|
||||
:allow_following_move,
|
||||
:is_discoverable,
|
||||
:accepts_chat_messages
|
||||
]
|
||||
|> Enum.reduce(%{}, fn key, acc ->
|
||||
|
@ -210,6 +209,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
|
|||
if bot, do: {:ok, "Service"}, else: {:ok, "Person"}
|
||||
end)
|
||||
|> Maps.put_if_present(:actor_type, params[:actor_type])
|
||||
|> Maps.put_if_present(:is_discoverable, params[:discoverable])
|
||||
|
||||
# What happens here:
|
||||
#
|
||||
|
|
|
@ -261,7 +261,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
|
|||
sensitive: false,
|
||||
fields: user.raw_fields,
|
||||
pleroma: %{
|
||||
is_discoverable: user.is_discoverable,
|
||||
discoverable: user.is_discoverable,
|
||||
actor_type: user.actor_type
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1278,7 +1278,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
|
|||
"note" => "",
|
||||
"pleroma" => %{
|
||||
"actor_type" => "Person",
|
||||
"is_discoverable" => false,
|
||||
"discoverable" => false,
|
||||
"no_rich_text" => false,
|
||||
"show_role" => true
|
||||
},
|
||||
|
|
|
@ -69,7 +69,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
|||
sensitive: false,
|
||||
pleroma: %{
|
||||
actor_type: "Person",
|
||||
is_discoverable: true
|
||||
discoverable: true
|
||||
},
|
||||
fields: []
|
||||
},
|
||||
|
@ -167,7 +167,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
|||
sensitive: false,
|
||||
pleroma: %{
|
||||
actor_type: "Service",
|
||||
is_discoverable: true
|
||||
discoverable: true
|
||||
},
|
||||
fields: []
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue