ActivityPub: When restricting to media posts, only show 'Creates'.
This commit is contained in:
parent
1e49bfa9ac
commit
1eb6cedaad
2 changed files with 11 additions and 2 deletions
|
|
@ -833,7 +833,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