activitypub: transmogrifier: fix bare tags
authorWilliam Pitcock <nenolod@dereferenced.org>
Tue, 5 Feb 2019 00:32:49 +0000 (00:32 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Tue, 5 Feb 2019 00:43:28 +0000 (00:43 +0000)
lib/pleroma/web/activity_pub/transmogrifier.ex

index 43725c3db9f273cb37c28099b6c88eb5ed28a7af..7151efdeb79774b1356403b4f7e291601b77098a 100644 (file)
@@ -313,6 +313,8 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
     |> Map.put("tag", combined)
   end
 
+  def fix_tag(%{"tag" => %{} = tag} = object), do: Map.put(object, "tag", [tag])
+
   def fix_tag(object), do: object
 
   # content map usually only has one language so this will do for now.