Add an explanation comment to Publisher.publish/2

This commit is contained in:
Egor Kislitsyn 2019-07-15 14:20:31 +07:00
parent 64a946643e
commit d86a97abfb

View file

@ -131,6 +131,8 @@ def publish(actor, %{data: %{"bcc" => bcc}} = activity) when is_list(bcc) and bc
%User{ap_id: ap_id} = %User{ap_id: ap_id} =
Enum.find(recipients, fn %{info: %{source_data: data}} -> data["inbox"] == inbox end) Enum.find(recipients, fn %{info: %{source_data: data}} -> data["inbox"] == inbox end)
# Get all the recipients on the same host and add them to cc. Otherwise it a remote
# instance would only accept a first message for the first recipient and ignore the rest.
cc = get_cc_ap_ids(ap_id, recipients) cc = get_cc_ap_ids(ap_id, recipients)
json = json =