aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-09-14 17:06:42 -0500
committerMark Felder <feld@FreeBSD.org>2020-09-14 17:06:42 -0500
commit709723182d69e1bb41a23c8abeb5d7c2c67b8c49 (patch)
tree3e140920b738812c49687a0fd85d6b7cf177fd98
parent118bf6e92bc112b20ba1ce2f7d0bd3bb5db7ebfe (diff)
downloadpleroma-709723182d69e1bb41a23c8abeb5d7c2c67b8c49.tar.gz
Ensure SimplePolicy's tags in string representation don't trip up the object validator
-rw-r--r--lib/pleroma/web/activity_pub/transmogrifier.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex
index af4384213..8fe430644 100644
--- a/lib/pleroma/web/activity_pub/transmogrifier.ex
+++ b/lib/pleroma/web/activity_pub/transmogrifier.ex
@@ -309,7 +309,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
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"], ":")