From 2748891e124ede3619cb2a77e27b83fbb8a724f8 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sat, 7 Jun 2025 12:23:47 -0700 Subject: [PATCH] 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" --- lib/pleroma/web/activity_pub/publisher.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/activity_pub/publisher.ex b/lib/pleroma/web/activity_pub/publisher.ex index 78312b771..4a5cbd64e 100644 --- a/lib/pleroma/web/activity_pub/publisher.ex +++ b/lib/pleroma/web/activity_pub/publisher.ex @@ -282,7 +282,7 @@ defmodule Pleroma.Web.ActivityPub.Publisher do [priority_recipients, recipients] = recipients(actor, activity) - inboxes = + [priority_inboxes, other_inboxes] = [priority_recipients, recipients] |> Enum.map(fn recipients -> recipients @@ -295,7 +295,7 @@ defmodule Pleroma.Web.ActivityPub.Publisher do end) Repo.checkout(fn -> - Enum.each(inboxes, fn inboxes -> + Enum.each([priority_inboxes, other_inboxes], fn inboxes -> Enum.each(inboxes, fn inbox -> %User{ap_id: ap_id} = Enum.find(recipients, fn actor -> actor.inbox == inbox end)