ensure we can't run the same clause of fix_quote_url more than once
authorFloatingGhost <hannah@coffee-and-dreams.uk>
Fri, 29 Jul 2022 09:08:40 +0000 (10:08 +0100)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Fri, 29 Jul 2022 09:08:40 +0000 (10:08 +0100)
lib/pleroma/web/activity_pub/transmogrifier.ex

index eea785a5538216f7582be5bd1bf42d66c62eaa90..dfd2c5dc87c2cecdd308ea2e2aab1666d2bd4f60 100644 (file)
@@ -201,12 +201,14 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
   def fix_quote_url(%{"quoteURL" => quote_url} = object, options) do
     object
     |> Map.put("quoteUri", quote_url)
+    |> Map.delete("quoteURL")
     |> fix_quote_url(options)
   end
 
   def fix_quote_url(%{"_misskey_quote" => quote_url} = object, options) do
     object
     |> Map.put("quoteUri", quote_url)
+    |> Map.delete("_misskey_quote")
     |> fix_quote_url(options)
   end