booster = insert(:user)
{:ok, user} = User.block(user, %{ap_id: activity_one.data["actor"]})
- activities = ActivityPub.fetch_activities([], %{"blocking_user" => user})
+ activities =
+ ActivityPub.fetch_activities([], %{"blocking_user" => user, "skip_preload" => true})
assert Enum.member?(activities, activity_two)
assert Enum.member?(activities, activity_three)
{:ok, user} = User.unblock(user, %{ap_id: activity_one.data["actor"]})
- activities = ActivityPub.fetch_activities([], %{"blocking_user" => user})
+ activities =
+ ActivityPub.fetch_activities([], %{"blocking_user" => user, "skip_preload" => true})
assert Enum.member?(activities, activity_two)
assert Enum.member?(activities, activity_three)
%Activity{} = boost_activity = Activity.get_create_by_object_ap_id(id)
activity_three = Repo.get(Activity, activity_three.id)
- activities = ActivityPub.fetch_activities([], %{"blocking_user" => user})
+ activities =
+ ActivityPub.fetch_activities([], %{"blocking_user" => user, "skip_preload" => true})
assert Enum.member?(activities, activity_two)
refute Enum.member?(activities, activity_three)
refute Enum.member?(activities, boost_activity)
assert Enum.member?(activities, activity_one)
- activities = ActivityPub.fetch_activities([], %{"blocking_user" => nil})
+ activities =
+ ActivityPub.fetch_activities([], %{"blocking_user" => nil, "skip_preload" => true})
assert Enum.member?(activities, activity_two)
assert Enum.member?(activities, activity_three)
booster = insert(:user)
{:ok, user} = User.mute(user, %User{ap_id: activity_one.data["actor"]})
- activities = ActivityPub.fetch_activities([], %{"muting_user" => user})
+ activities =
+ ActivityPub.fetch_activities([], %{"muting_user" => user, "skip_preload" => true})
assert Enum.member?(activities, activity_two)
assert Enum.member?(activities, activity_three)
refute Enum.member?(activities, activity_one)
# Calling with 'with_muted' will deliver muted activities, too.
- activities = ActivityPub.fetch_activities([], %{"muting_user" => user, "with_muted" => true})
+ activities =
+ ActivityPub.fetch_activities([], %{
+ "muting_user" => user,
+ "with_muted" => true,
+ "skip_preload" => true
+ })
assert Enum.member?(activities, activity_two)
assert Enum.member?(activities, activity_three)
{:ok, user} = User.unmute(user, %User{ap_id: activity_one.data["actor"]})
- activities = ActivityPub.fetch_activities([], %{"muting_user" => user})
+ activities =
+ ActivityPub.fetch_activities([], %{"muting_user" => user, "skip_preload" => true})
assert Enum.member?(activities, activity_two)
assert Enum.member?(activities, activity_three)
%Activity{} = boost_activity = Activity.get_create_by_object_ap_id(id)
activity_three = Repo.get(Activity, activity_three.id)
- activities = ActivityPub.fetch_activities([], %{"muting_user" => user})
+ activities =
+ ActivityPub.fetch_activities([], %{"muting_user" => user, "skip_preload" => true})
assert Enum.member?(activities, activity_two)
refute Enum.member?(activities, activity_three)
refute Enum.member?(activities, boost_activity)
assert Enum.member?(activities, activity_one)
- activities = ActivityPub.fetch_activities([], %{"muting_user" => nil})
+ activities = ActivityPub.fetch_activities([], %{"muting_user" => nil, "skip_preload" => true})
assert Enum.member?(activities, activity_two)
assert Enum.member?(activities, activity_three)