aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-04-18 06:59:23 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-04-18 06:59:23 +0000
commit79445ae5d25d7d0f775107eeede167dfd9aeb1bf (patch)
tree846c2e638e922623aa399d96d9eda79691602512 /lib
parentf1843db41d27c695b4fdb92b13fe6642102a35bc (diff)
parentd698ecef9b5ede19474f1a45b776f8ad9f8b7678 (diff)
downloadpleroma-79445ae5d25d7d0f775107eeede167dfd9aeb1bf.tar.gz
Merge branch 'bugfix/1697-user_emoji_miration' into 'develop'
migrations/20200406100225_users_add_emoji: Fix tag to Emoji filtering, electric bongaloo Closes #1697 See merge request pleroma/pleroma!2403
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index d403405a0..eedea08a2 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -1430,7 +1430,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
emojis =
data
|> Map.get("tag", [])
- |> Enum.filter(fn data -> data["type"] == "Emoji" and data["icon"] end)
+ |> Enum.filter(fn
+ %{"type" => "Emoji"} -> true
+ _ -> false
+ end)
|> Enum.reduce(%{}, fn %{"icon" => %{"url" => url}, "name" => name}, acc ->
Map.put(acc, String.trim(name, ":"), url)
end)