remove pool and timeout options which duplicate with the default
[akkoma] / lib / pleroma / web / salmon / salmon.ex
index 562ec3d9cd6b6aba0fdfd2999ab81ea082d205f4..0e2cfddd0ab7d7ec8b267ea311871f423ff0c2e0 100644 (file)
@@ -157,15 +157,12 @@ defmodule Pleroma.Web.Salmon do
     |> Enum.filter(fn user -> user && !user.local end)
   end
 
-  defp send_to_user(%{info: %{"salmon" => salmon}}, feed, poster) do
-    with {:ok, %{status_code: code}} <-
+  defp send_to_user(%{info: %{salmon: salmon}}, feed, poster) do
+    with {:ok, %{status: code}} <-
            poster.(
              salmon,
              feed,
-             [{"Content-Type", "application/magic-envelope+xml"}],
-             timeout: 10000,
-             recv_timeout: 20000,
-             hackney: [pool: :default]
+             [{"Content-Type", "application/magic-envelope+xml"}]
            ) do
       Logger.debug(fn -> "Pushed to #{salmon}, code #{code}" end)
     else
@@ -185,7 +182,7 @@ defmodule Pleroma.Web.Salmon do
   ]
   def publish(user, activity, poster \\ &@httpoison.post/4)
 
-  def publish(%{info: %{"keys" => keys}} = user, %{data: %{"type" => type}} = activity, poster)
+  def publish(%{info: %{keys: keys}} = user, %{data: %{"type" => type}} = activity, poster)
       when type in @supported_activities do
     feed = ActivityRepresenter.to_simple_form(activity, user, true)