projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
activitypub: remove contain_timeline()
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
utils.ex
diff --git
a/lib/pleroma/web/activity_pub/utils.ex
b/lib/pleroma/web/activity_pub/utils.ex
index ccc9da7c667dc03c39a984d164007aad0d6495da..236d1b4aca4f9c2b9447f68fe2af03867b1c96c1 100644
(file)
--- a/
lib/pleroma/web/activity_pub/utils.ex
+++ b/
lib/pleroma/web/activity_pub/utils.ex
@@
-234,14
+234,18
@@
defmodule Pleroma.Web.ActivityPub.Utils do
@doc """
Inserts a full object if it is contained in an activity.
"""
@doc """
Inserts a full object if it is contained in an activity.
"""
- def insert_full_object(%{"object" => %{"type" => type} = object_data})
+ def insert_full_object(%{"object" => %{"type" => type} = object_data}
= map
)
when is_map(object_data) and type in @supported_object_types do
with {:ok, object} <- Object.create(object_data) do
when is_map(object_data) and type in @supported_object_types do
with {:ok, object} <- Object.create(object_data) do
- {:ok, object}
+ map =
+ map
+ |> Map.put("object", object.data["id"])
+
+ {:ok, map, object}
end
end
end
end
- def insert_full_object(
_), do: {:ok
, nil}
+ def insert_full_object(
map), do: {:ok, map
, nil}
def update_object_in_activities(%{data: %{"id" => id}} = object) do
# TODO
def update_object_in_activities(%{data: %{"id" => id}} = object) do
# TODO
@@
-678,7
+682,7
@@
defmodule Pleroma.Web.ActivityPub.Utils do
"""
def fetch_ordered_collection(from, pages_left, acc \\ []) do
with {:ok, response} <- Tesla.get(from),
"""
def fetch_ordered_collection(from, pages_left, acc \\ []) do
with {:ok, response} <- Tesla.get(from),
- {:ok, collection} <-
Poi
son.decode(response.body) do
+ {:ok, collection} <-
Ja
son.decode(response.body) do
case collection["type"] do
"OrderedCollection" ->
# If we've encountered the OrderedCollection and not the page,
case collection["type"] do
"OrderedCollection" ->
# If we've encountered the OrderedCollection and not the page,