mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 18:17:55 +00:00
[Pleroma.Web.ActivityPub.ActivityPub]: Harden getting endpoints [kroeg]
This commit is contained in:
parent
3de12c194f
commit
523757be52
|
@ -683,7 +683,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
|||
(Pleroma.Web.Salmon.remote_users(activity) ++ followers)
|
||||
|> Enum.filter(fn user -> User.ap_enabled?(user) end)
|
||||
|> Enum.map(fn %{info: %{"source_data" => data}} ->
|
||||
(data["endpoints"] && data["endpoints"]["sharedInbox"]) || data["inbox"]
|
||||
(is_map(data["endpoints"]) && Map.get(data["endpoints"], "sharedInbox")) || data["inbox"]
|
||||
end)
|
||||
|> Enum.uniq()
|
||||
|> Enum.filter(fn inbox -> should_federate?(inbox, public) end)
|
||||
|
|
Loading…
Reference in a new issue