summaryrefslogtreecommitdiff
path: root/lib/pleroma/web/activity_pub/utils.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/activity_pub/utils.ex')
-rw-r--r--lib/pleroma/web/activity_pub/utils.ex7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex
index ac3a57e03..7a0762e9f 100644
--- a/lib/pleroma/web/activity_pub/utils.ex
+++ b/lib/pleroma/web/activity_pub/utils.ex
@@ -50,10 +50,13 @@ defmodule Pleroma.Web.ActivityPub.Utils do
changeset = Object.context_mapping(context)
case Repo.insert(changeset) do
- {:ok, object} -> object
+ {:ok, object} ->
+ object
+
# This should be solved by an upsert, but it seems ecto
# has problems accessing the constraint inside the jsonb.
- {:error, _} -> Object.get_cached_by_ap_id(context)
+ {:error, _} ->
+ Object.get_cached_by_ap_id(context)
end
end