Commit 70972318 authored by feld's avatar feld
Browse files

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

parent 118bf6e9
Pipeline #30998 passed with stages
in 18 minutes and 18 seconds
......@@ -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"], ":")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment