projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'rich_media_titles_two' into 'develop'
[akkoma]
/
lib
/
pleroma
/
emails
/
admin_email.ex
diff --git
a/lib/pleroma/emails/admin_email.ex
b/lib/pleroma/emails/admin_email.ex
index afefccec5e2b928149c6ad30c902a7d07dc1f3fa..d0e254362ba60c386582fc3c4f5835da3b36712a 100644
(file)
--- a/
lib/pleroma/emails/admin_email.ex
+++ b/
lib/pleroma/emails/admin_email.ex
@@
-2,7
+2,7
@@
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
-defmodule Pleroma.AdminEmail do
+defmodule Pleroma.
Emails.
AdminEmail do
@moduledoc "Admin emails"
import Swoosh.Email
@moduledoc "Admin emails"
import Swoosh.Email
@@
-11,7
+11,10
@@
defmodule Pleroma.AdminEmail do
defp instance_config, do: Pleroma.Config.get(:instance)
defp instance_name, do: instance_config()[:name]
defp instance_config, do: Pleroma.Config.get(:instance)
defp instance_name, do: instance_config()[:name]
- defp instance_email, do: instance_config()[:email]
+
+ defp instance_notify_email do
+ Keyword.get(instance_config(), :notify_email, instance_config()[:email])
+ end
defp user_url(user) do
Helpers.o_status_url(Pleroma.Web.Endpoint, :feed_redirect, user.nickname)
defp user_url(user) do
Helpers.o_status_url(Pleroma.Web.Endpoint, :feed_redirect, user.nickname)
@@
-26,7
+29,7
@@
defmodule Pleroma.AdminEmail do
end
statuses_html =
end
statuses_html =
- if length(statuses) > 0 do
+ if
is_list(statuses) &&
length(statuses) > 0 do
statuses_list_html =
statuses
|> Enum.map(fn
statuses_list_html =
statuses
|> Enum.map(fn
@@
-59,7
+62,7
@@
defmodule Pleroma.AdminEmail do
new()
|> to({to.name, to.email})
new()
|> to({to.name, to.email})
- |> from({instance_name(), instance_email()})
+ |> from({instance_name(), instance_
notify_
email()})
|> reply_to({reporter.name, reporter.email})
|> subject("#{instance_name()} Report")
|> html_body(html_body)
|> reply_to({reporter.name, reporter.email})
|> subject("#{instance_name()} Report")
|> html_body(html_body)