projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4ee99da
)
[#2497] Added missing alias, removed legacy `:adapter` option specification for HTTP...
author
Ivan Tashkinov
<ivantashkinov@gmail.com>
Wed, 9 Sep 2020 16:30:42 +0000
(19:30 +0300)
committer
Ivan Tashkinov
<ivantashkinov@gmail.com>
Wed, 9 Sep 2020 16:30:42 +0000
(19:30 +0300)
lib/pleroma/helpers/media_helper.ex
patch
|
blob
|
history
lib/pleroma/instances/instance.ex
patch
|
blob
|
history
lib/pleroma/web/media_proxy/media_proxy_controller.ex
patch
|
blob
|
history
test/web/mastodon_api/views/account_view_test.exs
patch
|
blob
|
history
diff --git
a/lib/pleroma/helpers/media_helper.ex
b/lib/pleroma/helpers/media_helper.ex
index a1205e10d2b7b959be714cef7412b511c2521f72..d834b4a0782cc9ea8de449b64dbfca9f23112ce7 100644
(file)
--- a/
lib/pleroma/helpers/media_helper.ex
+++ b/
lib/pleroma/helpers/media_helper.ex
@@
-14,7
+14,7
@@
defmodule Pleroma.Helpers.MediaHelper do
def image_resize(url, options) do
with executable when is_binary(executable) <- System.find_executable("convert"),
{:ok, args} <- prepare_image_resize_args(options),
def image_resize(url, options) do
with executable when is_binary(executable) <- System.find_executable("convert"),
{:ok, args} <- prepare_image_resize_args(options),
- {:ok, env} <- HTTP.get(url, [],
adapter: [pool: :media]
),
+ {:ok, env} <- HTTP.get(url, [],
pool: :media
),
{:ok, fifo_path} <- mkfifo() do
args = List.flatten([fifo_path, args])
run_fifo(fifo_path, env, executable, args)
{:ok, fifo_path} <- mkfifo() do
args = List.flatten([fifo_path, args])
run_fifo(fifo_path, env, executable, args)
@@
-62,7
+62,7
@@
defmodule Pleroma.Helpers.MediaHelper do
def video_framegrab(url) do
with executable when is_binary(executable) <- System.find_executable("ffmpeg"),
def video_framegrab(url) do
with executable when is_binary(executable) <- System.find_executable("ffmpeg"),
- {:ok, env} <- HTTP.get(url, [],
adapter: [pool: :media]
),
+ {:ok, env} <- HTTP.get(url, [],
pool: :media
),
{:ok, fifo_path} <- mkfifo(),
args = [
"-y",
{:ok, fifo_path} <- mkfifo(),
args = [
"-y",
diff --git
a/lib/pleroma/instances/instance.ex
b/lib/pleroma/instances/instance.ex
index 8bf53c090a8cc07a7df4ddb775af4cb8121535a3..4fe4b198d339153fae47671115c8aa43ce2df0e0 100644
(file)
--- a/
lib/pleroma/instances/instance.ex
+++ b/
lib/pleroma/instances/instance.ex
@@
-157,7
+157,7
@@
defmodule Pleroma.Instances.Instance do
try do
with {:ok, %Tesla.Env{body: html}} <-
Pleroma.HTTP.get(to_string(instance_uri), [{"accept", "text/html"}],
try do
with {:ok, %Tesla.Env{body: html}} <-
Pleroma.HTTP.get(to_string(instance_uri), [{"accept", "text/html"}],
- adapter: [pool: :media]
+ pool: :media
),
favicon_rel <-
html
),
favicon_rel <-
html
diff --git
a/lib/pleroma/web/media_proxy/media_proxy_controller.ex
b/lib/pleroma/web/media_proxy/media_proxy_controller.ex
index 89f4a23bdc6e1e4a21667a4920e4052684dc8a75..acb5814598c08dde5eda5cbdaeb904c55dc7dd37 100644
(file)
--- a/
lib/pleroma/web/media_proxy/media_proxy_controller.ex
+++ b/
lib/pleroma/web/media_proxy/media_proxy_controller.ex
@@
-51,7
+51,7
@@
defmodule Pleroma.Web.MediaProxy.MediaProxyController do
media_proxy_url = MediaProxy.url(url)
with {:ok, %{status: status} = head_response} when status in 200..299 <-
media_proxy_url = MediaProxy.url(url)
with {:ok, %{status: status} = head_response} when status in 200..299 <-
- Pleroma.HTTP.request("head", media_proxy_url, [], [],
adapter: [pool: :media]
) do
+ Pleroma.HTTP.request("head", media_proxy_url, [], [],
pool: :media
) do
content_type = Tesla.get_header(head_response, "content-type")
handle_preview(content_type, conn, media_proxy_url)
else
content_type = Tesla.get_header(head_response, "content-type")
handle_preview(content_type, conn, media_proxy_url)
else
diff --git
a/test/web/mastodon_api/views/account_view_test.exs
b/test/web/mastodon_api/views/account_view_test.exs
index 5c5aa6cee2a8ce9c1f905817bcd446a5f001ec5c..793b44fcaa64c8b7585c4eaae8c52060f7bae409 100644
(file)
--- a/
test/web/mastodon_api/views/account_view_test.exs
+++ b/
test/web/mastodon_api/views/account_view_test.exs
@@
-5,6
+5,7
@@
defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
use Pleroma.DataCase
defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
use Pleroma.DataCase
+ alias Pleroma.Config
alias Pleroma.User
alias Pleroma.UserRelationship
alias Pleroma.Web.CommonAPI
alias Pleroma.User
alias Pleroma.UserRelationship
alias Pleroma.Web.CommonAPI