summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-08-07 23:49:35 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-08-27 15:08:25 +0200
commit97e20d293266689d57c23abc7ae12ee05996517a (patch)
treecf9a3cd94b3892eb7764e8d578656baec77fbf1f /lib
parent83efaa3af6470485c5b47959ea94f7089971e205 (diff)
downloadpleroma-97e20d293266689d57c23abc7ae12ee05996517a.tar.gz
pleroma-97e20d293266689d57c23abc7ae12ee05996517a.zip
[MastodonAPI] the tag field isn’t fixed to a static type in pleroma
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index 749ffbcd4..ed2240530 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -84,7 +84,9 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
Pleroma.Web.Streamer.stream("public:local", activity)
end
- activity.data["object"]["tag"]
+ activity.data["object"]
+ |> Map.get("tag", [])
+ |> Enum.filter(fn tag -> is_bitstring(tag) end)
|> Enum.map(fn tag -> Pleroma.Web.Streamer.stream("hashtag:" <> tag, activity) end)
if activity.data["object"]["attachment"] != [] do