Ensure Gun is Gone
[akkoma] / lib / pleroma / reverse_proxy / client / tesla.ex
index d5a339681a752d6ae301ed08c33a49ca4b36353f..b21dc90365740e1a1a5a45c8210cee4028df1f90 100644 (file)
@@ -1,12 +1,10 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.ReverseProxy.Client.Tesla do
   @behaviour Pleroma.ReverseProxy.Client
 
-  alias Pleroma.Gun.ConnectionPool
-
   @type headers() :: [{String.t(), String.t()}]
   @type status() :: pos_integer()
 
@@ -28,7 +26,7 @@ defmodule Pleroma.ReverseProxy.Client.Tesla do
              url,
              body,
              headers,
-             Keyword.put(opts, :adapter, opts)
+             opts
            ) do
       if is_map(response.body) and method != :head do
         {:ok, response.status, response.headers, response.body}
@@ -77,10 +75,6 @@ defmodule Pleroma.ReverseProxy.Client.Tesla do
   defp check_adapter do
     adapter = Application.get_env(:tesla, :adapter)
 
-    unless adapter == Tesla.Adapter.Gun do
-      raise "#{adapter} doesn't support reading body in chunks"
-    end
-
     adapter
   end
 end