aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-09-23 09:16:00 +0000
committerlain <lain@soykaf.club>2020-09-23 09:16:00 +0000
commita6c14041c49df0dc850204723cfc1f242ded8aa2 (patch)
tree559fe96b7f65cd750a4bab5e9a117c43829c800f /lib
parent518c0f2962ab36660157d7cbc995d1f4562728b3 (diff)
parent34235bc02a88718b1d5a9d7fa2437784b91bb692 (diff)
downloadpleroma-a6c14041c49df0dc850204723cfc1f242ded8aa2.tar.gz
Merge branch 'develop' into 'issue/1975'
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/emails/mailer.ex5
-rw-r--r--lib/pleroma/web/mastodon_api/controllers/auth_controller.ex6
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/pleroma/emails/mailer.ex b/lib/pleroma/emails/mailer.ex
index 8b1bdef75..5108c71c8 100644
--- a/lib/pleroma/emails/mailer.ex
+++ b/lib/pleroma/emails/mailer.ex
@@ -35,6 +35,11 @@ defmodule Pleroma.Emails.Mailer do
def deliver(email, config \\ [])
def deliver(email, config) do
+ # temporary hackney fix until hackney max_connections bug is fixed
+ # https://git.pleroma.social/pleroma/pleroma/-/issues/2101
+ email =
+ Swoosh.Email.put_private(email, :hackney_options, ssl_options: [versions: [:"tlsv1.2"]])
+
case enabled?() do
true -> Swoosh.Mailer.deliver(email, parse_config(config))
false -> {:error, :deliveries_disabled}
diff --git a/lib/pleroma/web/mastodon_api/controllers/auth_controller.ex b/lib/pleroma/web/mastodon_api/controllers/auth_controller.ex
index 9f09550e1..57c0be5fe 100644
--- a/lib/pleroma/web/mastodon_api/controllers/auth_controller.ex
+++ b/lib/pleroma/web/mastodon_api/controllers/auth_controller.ex
@@ -5,6 +5,8 @@
defmodule Pleroma.Web.MastodonAPI.AuthController do
use Pleroma.Web, :controller
+ import Pleroma.Web.ControllerHelper, only: [json_response: 3]
+
alias Pleroma.User
alias Pleroma.Web.OAuth.App
alias Pleroma.Web.OAuth.Authorization
@@ -61,9 +63,7 @@ defmodule Pleroma.Web.MastodonAPI.AuthController do
TwitterAPI.password_reset(nickname_or_email)
- conn
- |> put_status(:no_content)
- |> json("")
+ json_response(conn, :no_content, "")
end
defp local_mastodon_root_path(conn) do