mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-18 10:59:17 +00:00
Object.Fetcher: Handle error on Containment.contain_origin/2
This commit is contained in:
parent
f00562ed6b
commit
40d0a198e2
|
@ -38,6 +38,7 @@ def fetch_object_from_id(id, options \\ []) do
|
|||
"type" => "Create",
|
||||
"to" => data["to"],
|
||||
"cc" => data["cc"],
|
||||
# TODO: Should we seriously keep this attributedTo thing?
|
||||
"actor" => data["actor"] || data["attributedTo"],
|
||||
"object" => data
|
||||
},
|
||||
|
@ -56,6 +57,9 @@ def fetch_object_from_id(id, options \\ []) do
|
|||
object = %Object{} ->
|
||||
{:ok, object}
|
||||
|
||||
:error ->
|
||||
{:error, "Object containment failed."}
|
||||
|
||||
_e ->
|
||||
Logger.info("Couldn't get object via AP, trying out OStatus fetching...")
|
||||
|
||||
|
|
Loading…
Reference in a new issue