forked from AkkomaGang/akkoma
[Pleroma.Web.ActivityPub.ActivityPub]: Harden getting endpoints [kroeg]
This commit is contained in:
parent
3de12c194f
commit
523757be52
1 changed files with 1 additions and 1 deletions
|
@ -683,7 +683,7 @@ def publish(actor, activity) 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