ensure we can't have a null in appends
This commit is contained in:
parent
9977588612
commit
5ca22c2459
1 changed files with 3 additions and 1 deletions
|
@ -227,8 +227,10 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
|||
|> Enum.filter(fn tag -> is_map(tag) and tag["type"] == "Mention" end)
|
||||
|> Enum.map(fn tag -> tag["href"] end)
|
||||
|
||||
to_data = if is_nil(object.data["to"]), do: [], else: object.data["to"]
|
||||
|
||||
mentions =
|
||||
(object.data["to"] ++ tag_mentions)
|
||||
(to_data ++ tag_mentions)
|
||||
|> Enum.uniq()
|
||||
|> Enum.map(fn
|
||||
Pleroma.Constants.as_public() -> nil
|
||||
|
|
Loading…
Reference in a new issue