Update Instance Actor when updating instance settings

Also fix an issue when publishing activities to followers/group members

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-07-07 15:51:42 +02:00
parent 744c040d0d
commit e0fad9ddd1
8 changed files with 263 additions and 41 deletions

View File

@@ -114,10 +114,9 @@ defmodule Mobilizon.Federation.ActivityPub.Utils do
def maybe_federate(_), do: :ok
def remote_actors(%{data: %{"to" => to} = data}) do
to = to ++ (data["cc"] || [])
to
@spec remote_actors(list(String.t())) :: list(Actor.t())
def remote_actors(recipients) do
recipients
|> Enum.map(fn url -> ActivityPub.get_or_fetch_actor_by_url(url) end)
|> Enum.map(fn {status, actor} ->
case status do