From 4f6caae2092abb3d80ad7a921a90f40d15e4051a Mon Sep 17 00:00:00 2001
From: FloatingGhost <hannah@coffee-and-dreams.uk>
Date: Fri, 29 Jul 2022 10:08:40 +0100
Subject: [PATCH] ensure we can't run the same clause of fix_quote_url more
 than once

---
 lib/pleroma/web/activity_pub/transmogrifier.ex | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex
index eea785a55..dfd2c5dc8 100644
--- a/lib/pleroma/web/activity_pub/transmogrifier.ex
+++ b/lib/pleroma/web/activity_pub/transmogrifier.ex
@@ -201,12 +201,14 @@ def fix_quote_url(%{"quoteUrl" => quote_url} = object, options) 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