From: Haelwenn (lanodan) Monnier Date: Tue, 7 Aug 2018 21:49:35 +0000 (+0200) Subject: [MastodonAPI] the tag field isn’t fixed to a static type in pleroma X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=97e20d293266689d57c23abc7ae12ee05996517a;p=akkoma [MastodonAPI] the tag field isn’t fixed to a static type in pleroma --- 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