[Pleroma.Web.ActivityPub.ActivityPub]: Harden getting endpoints [kroeg]
This commit is contained in:
parent
3de12c194f
commit
523757be52
@ -683,7 +683,7 @@ def publish(actor, activity) do
|
|||||||
(Pleroma.Web.Salmon.remote_users(activity) ++ followers)
|
(Pleroma.Web.Salmon.remote_users(activity) ++ followers)
|
||||||
|> Enum.filter(fn user -> User.ap_enabled?(user) end)
|
|> Enum.filter(fn user -> User.ap_enabled?(user) end)
|
||||||
|> Enum.map(fn %{info: %{"source_data" => data}} ->
|
|> 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)
|
end)
|
||||||
|> Enum.uniq()
|
|> Enum.uniq()
|
||||||
|> Enum.filter(fn inbox -> should_federate?(inbox, public) end)
|
|> Enum.filter(fn inbox -> should_federate?(inbox, public) end)
|
||||||
|
Loading…
Reference in New Issue
Block a user