activitypub: transmogrifier: fix bare tags
This commit is contained in:
parent
03991e7bc5
commit
e71ab5a10f
|
@ -313,6 +313,8 @@ def fix_tag(%{"tag" => %{"type" => "Hashtag", "name" => hashtag} = tag} = object
|
||||||
|> Map.put("tag", combined)
|
|> Map.put("tag", combined)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def fix_tag(%{"tag" => %{} = tag} = object), do: Map.put(object, "tag", [tag])
|
||||||
|
|
||||||
def fix_tag(object), do: object
|
def fix_tag(object), do: object
|
||||||
|
|
||||||
# content map usually only has one language so this will do for now.
|
# content map usually only has one language so this will do for now.
|
||||||
|
|
Loading…
Reference in New Issue