projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
purge chat and shout endpoints
[akkoma]
/
lib
/
pleroma
/
web
/
mastodon_api
/
controllers
/
account_controller.ex
diff --git
a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex
b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex
index 5303bdfd9f438dd1311a476ad3a56b54d4774354..ed7fb802ac16be008b413a42b1f9d10660cef5f0 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/controllers/account_controller.ex
+++ b/
lib/pleroma/web/mastodon_api/controllers/account_controller.ex
@@
-153,13
+153,10
@@
defmodule Pleroma.Web.MastodonAPI.AccountController do
@doc "GET /api/v1/accounts/verify_credentials"
def verify_credentials(%{assigns: %{user: user}} = conn, _) do
@doc "GET /api/v1/accounts/verify_credentials"
def verify_credentials(%{assigns: %{user: user}} = conn, _) do
- chat_token = Phoenix.Token.sign(conn, "user socket", user.id)
-
render(conn, "show.json",
user: user,
for: user,
render(conn, "show.json",
user: user,
for: user,
- with_pleroma_settings: true,
- with_chat_token: chat_token
+ with_pleroma_settings: true
)
end
)
end
@@
-188,8
+185,7
@@
defmodule Pleroma.Web.MastodonAPI.AccountController do
:show_role,
:skip_thread_containment,
:allow_following_move,
:show_role,
:skip_thread_containment,
:allow_following_move,
- :also_known_as,
- :accepts_chat_messages
+ :also_known_as
]
|> Enum.reduce(%{}, fn key, acc ->
Maps.put_if_present(acc, key, params[key], &{:ok, Params.truthy_param?(&1)})
]
|> Enum.reduce(%{}, fn key, acc ->
Maps.put_if_present(acc, key, params[key], &{:ok, Params.truthy_param?(&1)})
@@
-217,7
+213,7
@@
defmodule Pleroma.Web.MastodonAPI.AccountController do
|> Maps.put_if_present(:is_locked, params[:locked])
# Note: param name is indeed :discoverable (not an error)
|> Maps.put_if_present(:is_discoverable, params[:discoverable])
|> Maps.put_if_present(:is_locked, params[:locked])
# Note: param name is indeed :discoverable (not an error)
|> Maps.put_if_present(:is_discoverable, params[:discoverable])
- |> Maps.put_if_present(:language,
params[:language]
)
+ |> Maps.put_if_present(:language,
Pleroma.Web.Gettext.normalize_locale(params[:language])
)
# What happens here:
#
# What happens here:
#