Ensure SimplePolicy's tags in string representation don't trip up the object validator

This commit is contained in:
Mark Felder 2020-09-14 17:06:42 -05:00
parent 118bf6e92b
commit 709723182d

View file

@ -309,7 +309,7 @@ def fix_url(object), do: object
def fix_emoji(%{"tag" => tags} = object) when is_list(tags) do
emoji =
tags
|> Enum.filter(fn data -> data["type"] == "Emoji" and data["icon"] end)
|> Enum.filter(fn data -> is_map(data) and data["type"] == "Emoji" and data["icon"] end)
|> Enum.reduce(%{}, fn data, mapping ->
name = String.trim(data["name"], ":")