From: lain Date: Sun, 18 Feb 2018 21:57:07 +0000 (+0100) Subject: Salmon: Take both versions of public keys. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=78516a8daa7094506e0247e8bdaddfde77a4ba67;p=akkoma Salmon: Take both versions of public keys. --- diff --git a/lib/pleroma/web/salmon/salmon.ex b/lib/pleroma/web/salmon/salmon.ex index 4e95a5b25..46ca645d1 100644 --- a/lib/pleroma/web/salmon/salmon.ex +++ b/lib/pleroma/web/salmon/salmon.ex @@ -29,7 +29,8 @@ defmodule Pleroma.Web.Salmon do with [data, _, _, _, _] <- decode(salmon), doc <- XML.parse_document(data), uri when not is_nil(uri) <- XML.string_from_xpath("/entry/author[1]/uri", doc), - {:ok, %{info: %{"magic_key" => magic_key}}} <- Pleroma.Web.OStatus.find_or_make_user(uri) do + {:ok, public_key} <- User.get_public_key_for_ap_id(uri), + magic_key <- encode_key(public_key) do {:ok, magic_key} end end