diff options
author | lain <lain@soykaf.club> | 2018-02-18 22:57:07 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2018-02-18 22:57:07 +0100 |
commit | 78516a8daa7094506e0247e8bdaddfde77a4ba67 (patch) | |
tree | 5817ae34c8877063d3553a9b76d0b6ee15683532 | |
parent | dc1d3ceb724bb3a23e407ed2affa43e1a81d844d (diff) | |
download | pleroma-78516a8daa7094506e0247e8bdaddfde77a4ba67.tar.gz |
Salmon: Take both versions of public keys.
-rw-r--r-- | lib/pleroma/web/salmon/salmon.ex | 3 |
1 files changed, 2 insertions, 1 deletions
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 |