Fix refreshing groups

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-11-20 10:43:50 +01:00
parent fe997e27e6
commit 9dad6def3f

View File

@ -100,11 +100,7 @@ defmodule Mobilizon.Federation.ActivityPub.Refresher do
def refresh_all_external_groups do def refresh_all_external_groups do
Repo.transaction(fn -> Repo.transaction(fn ->
Actors.list_external_groups_for_stream() Actors.list_external_groups_for_stream()
|> Stream.map(fn %Actor{id: group_id, url: group_url} -> |> Stream.map(&refresh_profile/1)
{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.run() |> Stream.run()
end) end)
end end