hide follower/following for friendica

This commit is contained in:
kPherox 2019-11-30 04:26:45 +09:00
parent a990374e80
commit 0326683932
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D
1 changed files with 6 additions and 4 deletions

View File

@ -1233,13 +1233,13 @@ defp maybe_update_follow_information(data) do
end end
end end
defp collection_private(data) do defp collection_private(%{"first" => first}) do
if is_map(data["first"]) and if is_map(first) and
data["first"]["type"] in ["CollectionPage", "OrderedCollectionPage"] do first["type"] in ["CollectionPage", "OrderedCollectionPage"] do
{:ok, false} {:ok, false}
else else
with {:ok, %{"type" => type}} when type in ["CollectionPage", "OrderedCollectionPage"] <- 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} {:ok, false}
else else
{:error, {:ok, %{status: code}}} when code in [401, 403] -> {:error, {:ok, %{status: code}}} when code in [401, 403] ->
@ -1254,6 +1254,8 @@ defp collection_private(data) do
end end
end end
defp collection_private(_data), do: {:ok, true}
def user_data_from_user_object(data) do def user_data_from_user_object(data) do
with {:ok, data} <- MRF.filter(data), with {:ok, data} <- MRF.filter(data),
{:ok, data} <- object_to_user_data(data) do {:ok, data} <- object_to_user_data(data) do