Merge branch 'fix/blocked-user-boosts' into 'develop'
ActivityPub.ex: do not return boosted statuses from blocked users. See merge request pleroma/pleroma!111
This commit is contained in:
commit
a7a40bb8f1
2 changed files with 23 additions and 1 deletions
|
|
@ -313,7 +313,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