Exclude reblogs from `GET /api/pleroma/admin/statuses` by default
This commit is contained in:
parent
45b08ca166
commit
7af431c150
|
@ -278,6 +278,19 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret
|
||||||
- On failure: `Not found`
|
- On failure: `Not found`
|
||||||
- On success: JSON array of instance's latest statuses
|
- On success: JSON array of instance's latest statuses
|
||||||
|
|
||||||
|
## `GET /api/pleroma/admin/statuses`
|
||||||
|
|
||||||
|
### Retrives all latest statuses
|
||||||
|
|
||||||
|
- Params:
|
||||||
|
- *optional* `page_size`: number of statuses to return (default is `20`)
|
||||||
|
- *optional* `local_only`: excludes remote statuses
|
||||||
|
- *optional* `godmode`: `true`/`false` – allows to see private statuses
|
||||||
|
- *optional* `with_reblogs`: `true`/`false` – allows to see reblogs (default is false)
|
||||||
|
- Response:
|
||||||
|
- On failure: `Not found`
|
||||||
|
- On success: JSON array of user's latest statuses
|
||||||
|
|
||||||
## `POST /api/pleroma/admin/relay`
|
## `POST /api/pleroma/admin/relay`
|
||||||
|
|
||||||
### Follow a Relay
|
### Follow a Relay
|
||||||
|
|
|
@ -748,6 +748,7 @@ def report_notes_delete(%{assigns: %{user: user}} = conn, %{
|
||||||
def list_statuses(%{assigns: %{user: admin}} = conn, params) do
|
def list_statuses(%{assigns: %{user: admin}} = conn, params) do
|
||||||
godmode = params["godmode"] == "true" || params["godmode"] == true
|
godmode = params["godmode"] == "true" || params["godmode"] == true
|
||||||
local_only = params["local_only"] == "true" || params["local_only"] == true
|
local_only = params["local_only"] == "true" || params["local_only"] == true
|
||||||
|
with_reblogs = params["with_reblogs"] == "true" || params["with_reblogs"] == true
|
||||||
{page, page_size} = page_params(params)
|
{page, page_size} = page_params(params)
|
||||||
|
|
||||||
activities =
|
activities =
|
||||||
|
@ -755,7 +756,8 @@ def list_statuses(%{assigns: %{user: admin}} = conn, params) do
|
||||||
"godmode" => godmode,
|
"godmode" => godmode,
|
||||||
"local_only" => local_only,
|
"local_only" => local_only,
|
||||||
"limit" => page_size,
|
"limit" => page_size,
|
||||||
"offset" => (page - 1) * page_size
|
"offset" => (page - 1) * page_size,
|
||||||
|
"exclude_reblogs" => !with_reblogs && "true"
|
||||||
})
|
})
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|
|
Loading…
Reference in New Issue