Change the inboxes assignment in the Publisher to better indicate it's a list containing two lists
This clarifies what is really going on here and removes confusion about the nested Enum.each |> Enum.each which both were using an assignment called "inboxes"
This commit is contained in:
parent
3984ba8721
commit
2748891e12
1 changed files with 2 additions and 2 deletions
|
|
@ -282,7 +282,7 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
|
||||||
|
|
||||||
[priority_recipients, recipients] = recipients(actor, activity)
|
[priority_recipients, recipients] = recipients(actor, activity)
|
||||||
|
|
||||||
inboxes =
|
[priority_inboxes, other_inboxes] =
|
||||||
[priority_recipients, recipients]
|
[priority_recipients, recipients]
|
||||||
|> Enum.map(fn recipients ->
|
|> Enum.map(fn recipients ->
|
||||||
recipients
|
recipients
|
||||||
|
|
@ -295,7 +295,7 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Repo.checkout(fn ->
|
Repo.checkout(fn ->
|
||||||
Enum.each(inboxes, fn inboxes ->
|
Enum.each([priority_inboxes, other_inboxes], fn inboxes ->
|
||||||
Enum.each(inboxes, fn inbox ->
|
Enum.each(inboxes, fn inbox ->
|
||||||
%User{ap_id: ap_id} = Enum.find(recipients, fn actor -> actor.inbox == inbox end)
|
%User{ap_id: ap_id} = Enum.find(recipients, fn actor -> actor.inbox == inbox end)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue