X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Femails%2Fadmin_email.ex;h=c14be02dd98ce0f21869d3d2f8e161ad78b647ee;hb=e890ea7e821d61fca75084d46f70ed125acf1fc8;hp=d6ecce489a9a31b2200cbc78aa3daf7da8ff6fc1;hpb=184ae60b217f4e3a79aad538717d1cf35f10291a;p=akkoma diff --git a/lib/pleroma/emails/admin_email.ex b/lib/pleroma/emails/admin_email.ex index d6ecce489..c14be02dd 100644 --- a/lib/pleroma/emails/admin_email.ex +++ b/lib/pleroma/emails/admin_email.ex @@ -11,7 +11,10 @@ defmodule Pleroma.Emails.AdminEmail do 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) @@ -26,7 +29,7 @@ defmodule Pleroma.Emails.AdminEmail do end statuses_html = - if length(statuses) > 0 do + if is_list(statuses) && length(statuses) > 0 do statuses_list_html = statuses |> Enum.map(fn @@ -59,8 +62,7 @@ defmodule Pleroma.Emails.AdminEmail do new() |> to({to.name, to.email}) - |> from({instance_name(), instance_email()}) - |> reply_to({reporter.name, reporter.email}) + |> from({instance_name(), instance_notify_email()}) |> subject("#{instance_name()} Report") |> html_body(html_body) end