visibility: if litepub:directMessage is asserted, always report the object as "direct...
[akkoma] / lib / pleroma / web / salmon / salmon.ex
index f25d92fad0d3bef8daf63481d89c3aa86b96d706..9e91a5a4061e9b769d3c90f0eb670d5ae3899442 100644 (file)
@@ -5,11 +5,10 @@
 defmodule Pleroma.Web.Salmon do
   @behaviour Pleroma.Web.Federator.Publisher
 
-  @httpoison Application.get_env(:pleroma, :httpoison)
-
   use Bitwise
 
   alias Pleroma.Activity
+  alias Pleroma.HTTP
   alias Pleroma.Instances
   alias Pleroma.Keys
   alias Pleroma.User
@@ -138,7 +137,7 @@ defmodule Pleroma.Web.Salmon do
 
   def publish_one(%{recipient: url, feed: feed} = params) when is_binary(url) do
     with {:ok, %{status: code}} when code in 200..299 <-
-           @httpoison.post(
+           HTTP.post(
              url,
              feed,
              [{"Content-Type", "application/magic-envelope+xml"}]