fix http request in Salmon
This commit is contained in:
parent
ec34de0c1f
commit
97252a27d9
|
@ -158,14 +158,16 @@ def remote_users(%{data: %{"to" => to} = data}) do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp send_to_user(%{info: %{salmon: salmon}}, feed, poster) do
|
defp send_to_user(%{info: %{salmon: salmon}}, feed, poster) do
|
||||||
with {:ok, %{status_code: code}} <-
|
with {:ok, %{status: code}} <-
|
||||||
poster.(
|
poster.(
|
||||||
salmon,
|
salmon,
|
||||||
feed,
|
feed,
|
||||||
[{"Content-Type", "application/magic-envelope+xml"}],
|
[{"Content-Type", "application/magic-envelope+xml"}],
|
||||||
timeout: 10000,
|
adapter: [
|
||||||
recv_timeout: 20000,
|
timeout: 10000,
|
||||||
hackney: [pool: :default]
|
recv_timeout: 20000,
|
||||||
|
pool: :default
|
||||||
|
]
|
||||||
) do
|
) do
|
||||||
Logger.debug(fn -> "Pushed to #{salmon}, code #{code}" end)
|
Logger.debug(fn -> "Pushed to #{salmon}, code #{code}" end)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue