ActivityPub.ex: do not return boosted statuses from blocked users.
This commit is contained in:
parent
b910483c16
commit
48380aeccc
2 changed files with 23 additions and 1 deletions
|
|
@ -307,7 +307,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
|||
|
||||
defp restrict_blocked(query, %{"blocking_user" => %User{info: info}}) do
|
||||
blocks = info["blocks"] || []
|
||||
from(activity in query, where: fragment("not (? = ANY(?))", activity.actor, ^blocks))
|
||||
from(activity in query,
|
||||
where: fragment("not (? = ANY(?))", activity.actor, ^blocks),
|
||||
where: fragment("not (?->'to' \\?| ?)", activity.data, ^blocks)
|
||||
)
|
||||
end
|
||||
|
||||
defp restrict_blocked(query, _), do: query
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue