where: activity.id > ^since
end
- defp restrict_blocked(query, %{"blocking_user" => user}) do
- blocks = user.info["blocks"] || []
+ defp restrict_blocked(query, %{"blocking_user" => %User{info: info}}) do
+ blocks = info["blocks"] || []
from activity in query,
where: fragment("not (?->>'actor' = ANY(?))", activity.data, ^blocks)
end
assert Enum.member?(activities, activity_two)
assert Enum.member?(activities, activity_one)
+
+ activities = ActivityPub.fetch_activities([], %{"blocking_user" => nil})
+
+ assert Enum.member?(activities, activity_two)
+ assert Enum.member?(activities, activity_one)
end
describe "public fetch activities" do