common_fixes: Force inserting context and context_id
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Tue, 25 Aug 2020 00:18:33 +0000 (02:18 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Tue, 1 Sep 2020 06:35:00 +0000 (08:35 +0200)
lib/pleroma/web/activity_pub/object_validators/common_fixes.ex

index 721749de0c5611d5fe29ccfb43d5732b5ac2c9ca..720213d7327de4ea019f5e1ee6fbe7796f1dae8e 100644 (file)
@@ -11,8 +11,8 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonFixes do
       Utils.create_context(data["context"] || data["conversation"])
 
     data
-    |> Map.put_new("context", context)
-    |> Map.put_new("context_id", context_id)
+    |> Map.put("context", context)
+    |> Map.put("context_id", context_id)
   end
 
   def fix_attribution(data) do