fix(containment): return nil for actor shapes without an id
Containment.get_actor raised on remote shapes it did not know, such as an attributedTo object without an id. This crashed object fetches and poll refetches. Return nil, so containment rejects the object.
This commit is contained in:
parent
c81b1261dc
commit
90e330e5b3
4 changed files with 59 additions and 0 deletions
|
|
@ -44,6 +44,9 @@ defmodule Pleroma.Object.Containment do
|
|||
id
|
||||
end
|
||||
|
||||
# remote data can carry any shape here; callers treat nil as "no actor"
|
||||
def get_actor(_), do: nil
|
||||
|
||||
def get_object(%{"object" => id}) when is_binary(id) do
|
||||
id
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue