logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: 2748891e124ede3619cb2a77e27b83fbb8a724f8
parent 3984ba87217e2a9fdc89c22ff2357c49563c5ad2
Author: Mark Felder <feld@feld.me>
Date:   Sat,  7 Jun 2025 12:23:47 -0700

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"

Diffstat:

Mlib/pleroma/web/activity_pub/publisher.ex4++--
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 @@ -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)