Don't crash on AP request for tombstone
Because tombstone objects has no addressing the is_public?-predicate would cause an error that propagated as a 500 error in the api
This commit is contained in:
parent
ba17518a0a
commit
2d7da5f437
3 changed files with 29 additions and 0 deletions
|
|
@ -801,6 +801,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
|||
end
|
||||
end
|
||||
|
||||
def is_public?(%Object{data: %{"type" => "Tombstone"}}) do
|
||||
false
|
||||
end
|
||||
|
||||
def is_public?(activity) do
|
||||
"https://www.w3.org/ns/activitystreams#Public" in (activity.data["to"] ++
|
||||
(activity.data["cc"] || []))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue