Permit fetching statuses from API with nickname or id
authorMark Felder <feld@FreeBSD.org>
Wed, 29 May 2019 17:20:18 +0000 (12:20 -0500)
committerMark Felder <feld@FreeBSD.org>
Wed, 29 May 2019 17:20:18 +0000 (12:20 -0500)
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

index 2110027c3da313d238f06894c21fa38a54071f78..bc75ab35a09f14ab47c76a0228ca4e5a31b88a77 100644 (file)
@@ -330,7 +330,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
       activities = ActivityPub.fetch_user_activities(user, reading_user, params)
 
       conn