reports: fix up email generation for remote reports
authorWilliam Pitcock <nenolod@dereferenced.org>
Fri, 22 Mar 2019 01:17:14 +0000 (01:17 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Fri, 22 Mar 2019 01:17:14 +0000 (01:17 +0000)
lib/pleroma/emails/admin_email.ex

index 9b20c7e08197f23425612b4b79b54fbac0302933..afefccec5e2b928149c6ad30c902a7d07dc1f3fa 100644 (file)
@@ -29,9 +29,13 @@ defmodule Pleroma.AdminEmail do
       if length(statuses) > 0 do
         statuses_list_html =
           statuses
-          |> Enum.map(fn %{id: id} ->
-            status_url = Helpers.o_status_url(Pleroma.Web.Endpoint, :notice, id)
-            "<li><a href=\"#{status_url}\">#{status_url}</li>"
+          |> Enum.map(fn
+            %{id: id} ->
+              status_url = Helpers.o_status_url(Pleroma.Web.Endpoint, :notice, id)
+              "<li><a href=\"#{status_url}\">#{status_url}</li>"
+
+            id when is_binary(id) ->
+              "<li><a href=\"#{id}\">#{id}</li>"
           end)
           |> Enum.join("\n")