ActivityPub: change blocking/blockers queries to make timelines load again

This commit is contained in:
Alex Gleason 2022-01-09 15:29:55 -06:00
parent f9ae674a57
commit c04afbbfb4
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 2 deletions

View File

@ -1036,7 +1036,7 @@ defp restrict_blocked(query, %{blocking_user: %User{} = user} = opts) do
from(
[activity, object: o] in query,
# You don't block the author
where: fragment("not (? = ANY(?))", activity.actor, ^blocked_ap_ids),
where: fragment("not (? && ?)", [activity.actor], ^blocked_ap_ids),
# You don't block any recipients, and didn't author the post
where:
@ -1100,7 +1100,7 @@ defp restrict_blockers_visibility(query, %{blocking_user: %User{} = user}) do
from(
activity in query,
# The author doesn't block you
where: fragment("not (? = ANY(?))", activity.actor, ^blocker_ap_ids),
where: fragment("not (? && ?)", [activity.actor], ^blocker_ap_ids),
# It's not a boost of a user that blocks you
where: