Create tombstone instead of object deletion
[akkoma] / lib / pleroma / web / common_api / utils.ex
index 142283684b4d176448edd7605c8bae7eb7b79b0f..d25fef6bce05a5b2091897cbb754e54ce47fe523 100644 (file)
@@ -69,7 +69,12 @@ defmodule Pleroma.Web.CommonAPI.Utils do
     mentioned_users = Enum.map(mentions, fn {_, %{ap_id: ap_id}} -> ap_id end)
 
     if inReplyTo do
-      {Enum.uniq([inReplyTo.data["actor"] | mentioned_users]), []}
+      to =
+        [inReplyTo.data["actor"] | mentioned_users]
+        |> Enum.uniq()
+        |> Enum.reject(&is_nil/1)
+
+      {to, []}
     else
       {mentioned_users, []}
     end