From 9dad6def3f364097ea6cedd646e2266639a3d0ac Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 20 Nov 2020 10:43:50 +0100 Subject: [PATCH] Fix refreshing groups Signed-off-by: Thomas Citharel --- lib/federation/activity_pub/refresher.ex | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/federation/activity_pub/refresher.ex b/lib/federation/activity_pub/refresher.ex index cd7895ef4..0aee6d6e6 100644 --- a/lib/federation/activity_pub/refresher.ex +++ b/lib/federation/activity_pub/refresher.ex @@ -100,11 +100,7 @@ defmodule Mobilizon.Federation.ActivityPub.Refresher do def refresh_all_external_groups do Repo.transaction(fn -> Actors.list_external_groups_for_stream() - |> Stream.map(fn %Actor{id: group_id, url: group_url} -> - {group_url, Actors.get_single_group_member_actor(group_id)} - end) - |> Stream.filter(fn {_group_url, member_actor} -> not is_nil(member_actor) end) - |> Stream.map(fn {group_url, member_actor} -> fetch_group(group_url, member_actor) end) + |> Stream.map(&refresh_profile/1) |> Stream.run() end) end