diff options
author | rinpatch <rinpatch@sdf.org> | 2019-07-14 00:56:02 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-07-14 00:56:02 +0300 |
commit | 183da33e005c8a8e8472350a3b6b36ff6f82d67d (patch) | |
tree | f88346e4e9c371570b1460fded17b4c9289e4887 /lib | |
parent | d06d1b751d44802c5c3701f916ae2ce7d3c3be56 (diff) | |
download | pleroma-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.ex | 3 |
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] -> |