mapped signature plug: fix user lookup
authorAriadne Conill <ariadne@dereferenced.org>
Thu, 18 Jul 2019 16:27:50 +0000 (16:27 +0000)
committerAriadne Conill <ariadne@dereferenced.org>
Thu, 18 Jul 2019 16:27:50 +0000 (16:27 +0000)
lib/pleroma/plugs/mapped_signature_to_identity_plug.ex

index 2a8ed44708b96c3c6952b74bea61e744259279b2..1e7da4f503bd50c8a00ef2803edbad4df7f6abac 100644 (file)
@@ -23,7 +23,7 @@ defmodule Pleroma.Web.Plugs.MappedSignatureToIdentityPlug do
 
   defp user_from_key_id(conn) do
     with key_actor_id when is_binary(key_actor_id) <- key_id_from_conn(conn),
-         %User{} = user <- User.get_or_fetch_by_ap_id(key_actor_id) do
+         {:ok, %User{} = user} <- User.get_or_fetch_by_ap_id(key_actor_id) do
       user
     else
       _ ->