diff options
author | kPherox <admin@mail.kr-kp.com> | 2019-11-30 04:26:45 +0900 |
---|---|---|
committer | kPherox <admin@mail.kr-kp.com> | 2019-11-30 15:43:05 +0900 |
commit | 0326683932800c20dcec2b7d3500bff149cf091b (patch) | |
tree | 603987e1809ef2c298172e959eda90e3c69baf24 /lib/pleroma | |
parent | a990374e80ece3d28ae23f603bd5e301886e6a0c (diff) | |
download | pleroma-0326683932800c20dcec2b7d3500bff149cf091b.tar.gz |
hide follower/following for friendica
Diffstat (limited to 'lib/pleroma')
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index f25314ff6..f32d04175 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -1233,13 +1233,13 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do end end - defp collection_private(data) do - if is_map(data["first"]) and - data["first"]["type"] in ["CollectionPage", "OrderedCollectionPage"] do + defp collection_private(%{"first" => first}) do + if is_map(first) and + first["type"] in ["CollectionPage", "OrderedCollectionPage"] do {:ok, false} else with {:ok, %{"type" => type}} when type in ["CollectionPage", "OrderedCollectionPage"] <- - Fetcher.fetch_and_contain_remote_object_from_id(data["first"]) do + Fetcher.fetch_and_contain_remote_object_from_id(first) do {:ok, false} else {:error, {:ok, %{status: code}}} when code in [401, 403] -> @@ -1254,6 +1254,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do end end + defp collection_private(_data), do: {:ok, true} + def user_data_from_user_object(data) do with {:ok, data} <- MRF.filter(data), {:ok, data} <- object_to_user_data(data) do |