diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex
index 07c1f8028..5f78ff97f 100644
--- a/lib/pleroma/web/router.ex
+++ b/lib/pleroma/web/router.ex
@@ -33,6 +33,7 @@ def user_fetcher(username) do
get "/statuses/public_and_external_timeline", TwitterAPI.Controller, :public_and_external_timeline
get "/statuses/networkpublic_timeline", TwitterAPI.Controller, :public_and_external_timeline
get "/statuses/user_timeline", TwitterAPI.Controller, :user_timeline
+ get "/qvitter/statuses/user_timeline", TwitterAPI.Controller, :user_timeline
get "/statuses/show/:id", TwitterAPI.Controller, :fetch_status
get "/statusnet/conversation/:id", TwitterAPI.Controller, :fetch_conversation
diff --git a/lib/pleroma/web/twitter_api/twitter_api.ex b/lib/pleroma/web/twitter_api/twitter_api.ex
index 6eb69f815..cf9610723 100644
--- a/lib/pleroma/web/twitter_api/twitter_api.ex
+++ b/lib/pleroma/web/twitter_api/twitter_api.ex
@@ -215,10 +215,18 @@ def register_user(params) do
end
end
+ def get_by_id_or_nickname(id_or_nickname) do
+ if !is_integer(id_or_nickname) && :error == Integer.parse(id_or_nickname) do
+ Repo.get_by(User, nickname: id_or_nickname)
+ else
+ Repo.get(User, id_or_nickname)
+ end
+ end
+
def get_user(user \\ nil, params) do
case params do
%{"user_id" => user_id} ->
- case target = Repo.get(User, user_id) do
+ case target = get_by_id_or_nickname(user_id) do
nil ->
{:error, "No user with such user_id"}
_ ->
diff --git a/priv/static/index.html b/priv/static/index.html
index 76a4ea4ce..65b070c29 100644
--- a/priv/static/index.html
+++ b/priv/static/index.html
@@ -1 +1 @@
-
Pleroma
\ No newline at end of file
+Pleroma
\ No newline at end of file
diff --git a/priv/static/static/js/app.21c841e6c909dfcf6600.js b/priv/static/static/js/app.21c841e6c909dfcf6600.js
new file mode 100644
index 000000000..85886911c
Binary files /dev/null and b/priv/static/static/js/app.21c841e6c909dfcf6600.js differ
diff --git a/priv/static/static/js/app.21c841e6c909dfcf6600.js.map b/priv/static/static/js/app.21c841e6c909dfcf6600.js.map
new file mode 100644
index 000000000..7d1cf7813
Binary files /dev/null and b/priv/static/static/js/app.21c841e6c909dfcf6600.js.map differ
diff --git a/priv/static/static/js/app.cb2a631521680466b348.js b/priv/static/static/js/app.cb2a631521680466b348.js
deleted file mode 100644
index dd6ad6efa..000000000
Binary files a/priv/static/static/js/app.cb2a631521680466b348.js and /dev/null differ
diff --git a/priv/static/static/js/app.cb2a631521680466b348.js.map b/priv/static/static/js/app.cb2a631521680466b348.js.map
deleted file mode 100644
index 4b91ada2e..000000000
Binary files a/priv/static/static/js/app.cb2a631521680466b348.js.map and /dev/null differ
diff --git a/priv/static/static/js/manifest.43d2fa23b3a57580d990.js b/priv/static/static/js/manifest.43d2fa23b3a57580d990.js
new file mode 100644
index 000000000..440b064d6
Binary files /dev/null and b/priv/static/static/js/manifest.43d2fa23b3a57580d990.js differ
diff --git a/priv/static/static/js/manifest.f77f8e3098770cd89c4f.js.map b/priv/static/static/js/manifest.43d2fa23b3a57580d990.js.map
similarity index 92%
rename from priv/static/static/js/manifest.f77f8e3098770cd89c4f.js.map
rename to priv/static/static/js/manifest.43d2fa23b3a57580d990.js.map
index 230429785..4fc8b96cc 100644
Binary files a/priv/static/static/js/manifest.f77f8e3098770cd89c4f.js.map and b/priv/static/static/js/manifest.43d2fa23b3a57580d990.js.map differ
diff --git a/priv/static/static/js/manifest.f77f8e3098770cd89c4f.js b/priv/static/static/js/manifest.f77f8e3098770cd89c4f.js
deleted file mode 100644
index 6924b25b4..000000000
Binary files a/priv/static/static/js/manifest.f77f8e3098770cd89c4f.js and /dev/null differ
diff --git a/priv/static/static/js/vendor.bcbf57bfdffb555a1e28.js b/priv/static/static/js/vendor.7b75d360647f8aca9a27.js
similarity index 91%
rename from priv/static/static/js/vendor.bcbf57bfdffb555a1e28.js
rename to priv/static/static/js/vendor.7b75d360647f8aca9a27.js
index ea4333f59..a1267edec 100644
Binary files a/priv/static/static/js/vendor.bcbf57bfdffb555a1e28.js and b/priv/static/static/js/vendor.7b75d360647f8aca9a27.js differ
diff --git a/priv/static/static/js/vendor.7b75d360647f8aca9a27.js.map b/priv/static/static/js/vendor.7b75d360647f8aca9a27.js.map
new file mode 100644
index 000000000..6ac5271c3
Binary files /dev/null and b/priv/static/static/js/vendor.7b75d360647f8aca9a27.js.map differ
diff --git a/priv/static/static/js/vendor.bcbf57bfdffb555a1e28.js.map b/priv/static/static/js/vendor.bcbf57bfdffb555a1e28.js.map
deleted file mode 100644
index 604e2eadb..000000000
Binary files a/priv/static/static/js/vendor.bcbf57bfdffb555a1e28.js.map and /dev/null differ
diff --git a/test/web/twitter_api/twitter_api_test.exs b/test/web/twitter_api/twitter_api_test.exs
index df1022d6b..d5a1fa57a 100644
--- a/test/web/twitter_api/twitter_api_test.exs
+++ b/test/web/twitter_api/twitter_api_test.exs
@@ -133,6 +133,7 @@ test "get a user by params" do
assert {:error, "You need to specify screen_name or user_id"} == TwitterAPI.get_user(nil, nil)
assert user1_result == TwitterAPI.get_user(nil, %{"user_id" => user1.id})
+ assert user1_result == TwitterAPI.get_user(nil, %{"user_id" => user1.nickname})
assert user1_result == TwitterAPI.get_user(nil, %{"screen_name" => user1.nickname})
assert user1_result == TwitterAPI.get_user(user1, nil)
assert user1_result == TwitterAPI.get_user(user2, %{"user_id" => user1.id})