summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/html.ex2
-rw-r--r--lib/pleroma/web/activity_pub/transmogrifier.ex2
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/pleroma/html.ex b/lib/pleroma/html.ex
index bf5daa948..b4a4742ee 100644
--- a/lib/pleroma/html.ex
+++ b/lib/pleroma/html.ex
@@ -59,6 +59,8 @@ defmodule Pleroma.HTML do
end)
end
+ def extract_first_external_url(_, nil), do: {:error, "No content"}
+
def extract_first_external_url(object, content) do
key = "URL|#{object.id}"
diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex
index 43725c3db..7151efdeb 100644
--- a/lib/pleroma/web/activity_pub/transmogrifier.ex
+++ b/lib/pleroma/web/activity_pub/transmogrifier.ex
@@ -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.