aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfeld <feld@feld.me>2019-07-19 21:59:18 +0000
committerfeld <feld@feld.me>2019-07-19 21:59:18 +0000
commit93df0796f05eff382301de91fb268bb4bc3c3379 (patch)
tree64c841338c170703d8089684855175a913e374ca
parent33729bbb2834bfa1f223b11d47dc8e3230d47657 (diff)
parent9169f331b6d481a0aa2b0bfe91500d695fb1b6d6 (diff)
downloadpleroma-93df0796f05eff382301de91fb268bb4bc3c3379.tar.gz
Merge branch 'feature/matstodon-statuses-by-name' into 'develop'
Feature/matstodon statuses by name See merge request pleroma/pleroma!1211
-rw-r--r--CHANGELOG.md1
-rw-r--r--docs/api/differences_in_mastoapi_responses.md5
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex2
3 files changed, 6 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a9906a05f..2e79b5420 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Mastodon API: Add support for the `blocked_by` attribute in the relationship API (`GET /api/v1/accounts/relationships`). <https://github.com/tootsuite/mastodon/pull/10373>
- Mastodon API: Add `pleroma.deactivated` to the Account entity
- Mastodon API: added `/auth/password` endpoint for password reset with rate limit.
+- Mastodon API: /api/v1/accounts/:id/statuses now supports nicknames or user id
- Admin API: Return users' tags when querying reports
- Admin API: Return avatar and display name when querying users
- Admin API: Allow querying user by ID
diff --git a/docs/api/differences_in_mastoapi_responses.md b/docs/api/differences_in_mastoapi_responses.md
index c65b11872..1907d70c8 100644
--- a/docs/api/differences_in_mastoapi_responses.md
+++ b/docs/api/differences_in_mastoapi_responses.md
@@ -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:
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 877430a1d..e8b43e475 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -440,7 +440,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"])