diff options
author | Mark Felder <feld@feld.me> | 2023-12-27 15:27:37 -0500 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2023-12-27 15:27:39 -0500 |
commit | d4c77103d1fe5df9b2ea8bd3429a8fc0240645c1 (patch) | |
tree | 671a9c04550c168060cdc360d58af2c52b63a54d | |
parent | 5f5109413840d6ebcbee632fb883ae27dc3b45f7 (diff) | |
download | pleroma-d4c77103d1fe5df9b2ea8bd3429a8fc0240645c1.tar.gz pleroma-d4c77103d1fe5df9b2ea8bd3429a8fc0240645c1.zip |
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.
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 32d1a1037..39159b1c4 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -1697,9 +1697,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub 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 |