1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-26 06:05:19 +01:00

Permit fetching statuses from API with nickname or id

This commit is contained in:
Mark Felder 2019-05-29 12:20:18 -05:00
parent 7e889786b8
commit e7edfd9fec

View File

@ -330,7 +330,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
end end
def user_statuses(%{assigns: %{user: reading_user}} = conn, params) do 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) activities = ActivityPub.fetch_user_activities(user, reading_user, params)
conn conn