Ensure SimplePolicy's tags in string representation don't trip up the object validator
This commit is contained in:
parent
118bf6e92b
commit
709723182d
1 changed files with 1 additions and 1 deletions
|
@ -309,7 +309,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
||||||
def fix_emoji(%{"tag" => tags} = object) when is_list(tags) do
|
def fix_emoji(%{"tag" => tags} = object) when is_list(tags) do
|
||||||
emoji =
|
emoji =
|
||||||
tags
|
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 ->
|
|> Enum.reduce(%{}, fn data, mapping ->
|
||||||
name = String.trim(data["name"], ":")
|
name = String.trim(data["name"], ":")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue