Fix federating to followers
This commit is contained in:
parent
5326951e8a
commit
dcadde5e37
|
@ -18,7 +18,7 @@ defmodule Clacks.ActivityPub.Federator do
|
|||
addressed_actors =
|
||||
if actor.data["followers"] in addressed do
|
||||
addressed = List.delete(addressed, actor.data["followers"])
|
||||
[actor.followers | addressed]
|
||||
actor.followers ++ addressed
|
||||
else
|
||||
addressed
|
||||
end
|
||||
|
|
|
@ -48,12 +48,11 @@ defmodule Clacks.UserActionsHelper do
|
|||
end
|
||||
end
|
||||
|
||||
@spec get_addressed(String.t(), [{String.t(), Actor.t()}], String.t() | nil) ::
|
||||
@spec get_addressed(User.t(), [{String.t(), Actor.t()}], String.t() | nil) ::
|
||||
{[String.t()], [String.t()]}
|
||||
defp get_addressed(_author, mentions, in_reply_to_actor) do
|
||||
defp get_addressed(author, mentions, in_reply_to_actor) do
|
||||
to = [@public | Enum.map(mentions, fn {_, actor} -> actor.ap_id end)]
|
||||
# todo: followers
|
||||
cc = []
|
||||
cc = [Repo.preload(author, :actor).actor.data["followers"]]
|
||||
|
||||
to =
|
||||
case in_reply_to_actor do
|
||||
|
|
Loading…
Reference in New Issue