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:
Lain Soykaf 2026-10-27 22:03:13 +04:00
commit 90e330e5b3
No known key found for this signature in database
4 changed files with 59 additions and 0 deletions

View file

@ -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