Add base CAPTCHA support (currently only kocaptcha)
[akkoma] / lib / pleroma / web / activity_pub / activity_pub.ex
index aaf9d3854b1b80d229f0c04324988fbab2494d08..31455343c96e012142ee3ef6b759eaad3bcdb918 100644 (file)
@@ -769,13 +769,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
     Logger.info("Fetching #{id} via AP")
 
     with true <- String.starts_with?(id, "http"),
-         {:ok, %{body: body, status_code: code}} when code in 200..299 <-
+         {:ok, %{body: body, status: code}} when code in 200..299 <-
            @httpoison.get(
              id,
-             [Accept: "application/activity+json"],
-             follow_redirect: true,
-             timeout: 10000,
-             recv_timeout: 20000
+             [{:Accept, "application/activity+json"}]
            ),
          {:ok, data} <- Jason.decode(body),
          :ok <- Transmogrifier.contain_origin_from_id(id, data) do
@@ -802,7 +799,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
   end
 
   # guard
-  def entire_thread_visible_for_user?(nil, user), do: false
+  def entire_thread_visible_for_user?(nil, _user), do: false
 
   # child
   def entire_thread_visible_for_user?(