Merge branch '1865-media-only' into 'develop'
Resolve "/api/v1/accounts/:id/statuses?only_media=true returns media that is not owned" Closes #1865 See merge request pleroma/pleroma!2650
This commit is contained in:
commit
c75ba63bef
3 changed files with 12 additions and 2 deletions
|
|
@ -834,7 +834,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
|||
|
||||
defp restrict_media(query, %{only_media: true}) do
|
||||
from(
|
||||
[_activity, object] in query,
|
||||
[activity, object] in query,
|
||||
where: fragment("(?)->>'type' = ?", activity.data, "Create"),
|
||||
where: fragment("not (?)->'attachment' = (?)", object.data, ^[])
|
||||
)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue