forked from AkkomaGang/akkoma
Fix detection of user follower collection being private
We were overzealous with matching on a raw error from the object fetch that should have never been relied on like this. If we can't fetch successfully we should assume that the collection is private. Building a more expressive and universal error struct to match on may be something to consider.
This commit is contained in:
parent
30d63aaa6e
commit
eeed051a0f
1 changed files with 1 additions and 3 deletions
|
@ -1705,9 +1705,7 @@ defp collection_private(%{"first" => first}) do
|
|||
Fetcher.fetch_and_contain_remote_object_from_id(first) do
|
||||
{:ok, false}
|
||||
else
|
||||
{:error, {:ok, %{status: code}}} when code in [401, 403] -> {:ok, true}
|
||||
{:error, _} = e -> e
|
||||
e -> {:error, e}
|
||||
{:error, _} -> {:ok, true}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue