Fix duplicate inbox deliveries
This commit is contained in:
parent
8bc59e9743
commit
3c30eadd5e
|
@ -255,7 +255,10 @@ def publish(%User{} = actor, %{data: %{"bcc" => bcc}} = activity)
|
||||||
[priority_recipients, recipients]
|
[priority_recipients, recipients]
|
||||||
|> Enum.map(fn recipients ->
|
|> Enum.map(fn recipients ->
|
||||||
recipients
|
recipients
|
||||||
|> Enum.map(fn actor -> actor.inbox end)
|
|> Enum.map(fn %User{} = user ->
|
||||||
|
determine_inbox(activity, user)
|
||||||
|
end)
|
||||||
|
|> Enum.uniq()
|
||||||
|> Enum.filter(fn inbox -> should_federate?(inbox, public) end)
|
|> Enum.filter(fn inbox -> should_federate?(inbox, public) end)
|
||||||
|> Instances.filter_reachable()
|
|> Instances.filter_reachable()
|
||||||
end)
|
end)
|
||||||
|
@ -302,7 +305,10 @@ def publish(%User{} = actor, %Activity{} = activity) do
|
||||||
recipients(actor, activity)
|
recipients(actor, activity)
|
||||||
|> Enum.map(fn recipients ->
|
|> Enum.map(fn recipients ->
|
||||||
recipients
|
recipients
|
||||||
|> Enum.map(fn actor -> actor.inbox end)
|
|> Enum.map(fn %User{} = user ->
|
||||||
|
determine_inbox(activity, user)
|
||||||
|
end)
|
||||||
|
|> Enum.uniq()
|
||||||
|> Enum.filter(fn inbox -> should_federate?(inbox, public) end)
|
|> Enum.filter(fn inbox -> should_federate?(inbox, public) end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue