diff options
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 142283684..d25fef6bc 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -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 |