Object: Rework how Object.normalize works
Now it defaults to not fetching, and the option is named.
This commit is contained in:
parent
afe9c152ab
commit
e1e7e4d379
77 changed files with 269 additions and 246 deletions
|
|
@ -319,7 +319,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
|
|||
defp add_in_reply_to(object, nil), do: object
|
||||
|
||||
defp add_in_reply_to(object, in_reply_to) do
|
||||
with %Object{} = in_reply_to_object <- Object.normalize(in_reply_to) do
|
||||
with %Object{} = in_reply_to_object <- Object.normalize(in_reply_to, fetch: false) do
|
||||
Map.put(object, "inReplyTo", in_reply_to_object.data["id"])
|
||||
else
|
||||
_ -> object
|
||||
|
|
@ -399,7 +399,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
|
|||
%Activity{data: %{"to" => _to, "type" => type} = data} = activity
|
||||
)
|
||||
when type == "Create" do
|
||||
object = Object.normalize(activity, false)
|
||||
object = Object.normalize(activity, fetch: false)
|
||||
|
||||
object_data =
|
||||
cond do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue