forked from YokaiRick/akkoma
activitypub: when fetching objects, use the preloaded object from the synthesized activity
This commit is contained in:
parent
aabcecb269
commit
ce47eb8b29
1 changed files with 2 additions and 2 deletions
|
@ -957,7 +957,7 @@ def fetch_object_from_id(id) do
|
|||
},
|
||||
:ok <- Transmogrifier.contain_origin(id, params),
|
||||
{:ok, activity} <- Transmogrifier.handle_incoming(params) do
|
||||
{:ok, Object.normalize(activity.data["object"])}
|
||||
{:ok, Object.normalize(activity)}
|
||||
else
|
||||
{:error, {:reject, nil}} ->
|
||||
{:reject, nil}
|
||||
|
@ -969,7 +969,7 @@ def fetch_object_from_id(id) do
|
|||
Logger.info("Couldn't get object via AP, trying out OStatus fetching...")
|
||||
|
||||
case OStatus.fetch_activity_from_url(id) do
|
||||
{:ok, [activity | _]} -> {:ok, Object.normalize(activity.data["object"])}
|
||||
{:ok, [activity | _]} -> {:ok, Object.normalize(activity)}
|
||||
e -> e
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue