projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into conversations-import
[akkoma]
/
lib
/
pleroma
/
web
/
twitter_api
/
twitter_api.ex
diff --git
a/lib/pleroma/web/twitter_api/twitter_api.ex
b/lib/pleroma/web/twitter_api/twitter_api.ex
index 1362ef57cf81894c2251721e98511844a7733eae..41e1c287744b48813b0f1a582b420e4855adf341 100644
(file)
--- a/
lib/pleroma/web/twitter_api/twitter_api.ex
+++ b/
lib/pleroma/web/twitter_api/twitter_api.ex
@@
-236,12
+236,15
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
def get_user(user \\ nil, params) do
case params do
%{"user_id" => user_id} ->
def get_user(user \\ nil, params) do
case params do
%{"user_id" => user_id} ->
- case
target =
User.get_cached_by_nickname_or_id(user_id) do
+ case User.get_cached_by_nickname_or_id(user_id) do
nil ->
{:error, "No user with such user_id"}
nil ->
{:error, "No user with such user_id"}
- _ ->
- {:ok, target}
+ %User{info: %{deactivated: true}} ->
+ {:error, "User has been disabled"}
+
+ user ->
+ {:ok, user}
end
%{"screen_name" => nickname} ->
end
%{"screen_name" => nickname} ->