Merge branch 'develop' into feature/matstodon-statuses-by-name
authorMark Felder <feld@FreeBSD.org>
Mon, 15 Jul 2019 22:10:27 +0000 (17:10 -0500)
committerMark Felder <feld@FreeBSD.org>
Mon, 15 Jul 2019 22:10:27 +0000 (17:10 -0500)
docs/api/differences_in_mastoapi_responses.md
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

index d2e9bcc4b83504dde87e45ee66d73875a2ef239f..f5a72543a20ac199996bc1d909abf2fa568b8073 100644 (file)
@@ -34,7 +34,10 @@ Has these additional fields under the `pleroma` object:
 
 ## Accounts
 
-- `/api/v1/accounts/:id`: The `id` parameter can also be the `nickname` of the user. This only works in this endpoint, not the deeper nested ones for following etc.
+The `id` parameter can also be the `nickname` of the user. This only works in these endpoints, not the deeper nested ones for following etc.
+
+- `/api/v1/accounts/:id`
+- `/api/v1/accounts/:id/statuses`
 
 Has these additional fields under the `pleroma` object:
 
index f4aa576f73463482ccc35aea5c2bfa8acb9315c6..29b1391d360ebe7e5ec5826ca4e3a676983ad403 100644 (file)
@@ -431,7 +431,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
   end
 
   def user_statuses(%{assigns: %{user: reading_user}} = conn, params) do
-    with %User{} = user <- User.get_cached_by_id(params["id"]) do
+    with %User{} = user <- User.get_cached_by_nickname_or_id(params["id"]) do
       params =
         params
         |> Map.put("tag", params["tagged"])