aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-07-14 00:56:02 +0300
committerrinpatch <rinpatch@sdf.org>2019-07-14 00:56:02 +0300
commit183da33e005c8a8e8472350a3b6b36ff6f82d67d (patch)
treef88346e4e9c371570b1460fded17b4c9289e4887 /lib
parentd06d1b751d44802c5c3701f916ae2ce7d3c3be56 (diff)
downloadpleroma-183da33e005c8a8e8472350a3b6b36ff6f82d67d.tar.gz
Add tests for fetch_follow_information_for_user and check object type
when fetching the page
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index df4155d21..c821ba45f 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -1063,7 +1063,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
data["first"]["type"] in ["CollectionPage", "OrderedCollectionPage"] do
{:ok, false}
else
- with {:ok, _data} <- Fetcher.fetch_and_contain_remote_object_from_id(data["first"]) do
+ with {:ok, %{"type" => type}} when type in ["CollectionPage", "OrderedCollectionPage"] <-
+ Fetcher.fetch_and_contain_remote_object_from_id(data["first"]) do
{:ok, false}
else
{:error, {:ok, %{status: code}}} when code in [401, 403] ->