ensure we can't run the same clause of fix_quote_url more than once

This commit is contained in:
FloatingGhost 2022-07-29 10:08:40 +01:00
parent bf3f934275
commit 4f6caae209

View file

@ -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