mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-24 18:15:19 +00:00
ensure we can't have a null in appends
This commit is contained in:
parent
9977588612
commit
5ca22c2459
|
@ -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