Verified Commit 97e20d29 authored by Haelwenn's avatar Haelwenn

[MastodonAPI] the tag field isn’t fixed to a static type in pleroma

parent 83efaa3a
......@@ -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
......
Markdown is supported
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