Invalidate user after key creation.
authorlain <lain@soykaf.club>
Sat, 24 Feb 2018 17:23:47 +0000 (18:23 +0100)
committerlain <lain@soykaf.club>
Sat, 24 Feb 2018 17:23:47 +0000 (18:23 +0100)
lib/pleroma/web/web_finger/web_finger.ex

index bbd65da61627af8e739b0292b5b9fba624c670fa..3cd849de4a993c845e181c1876930dcff0d6f1e7 100644 (file)
@@ -60,6 +60,8 @@ defmodule Pleroma.Web.WebFinger do
     else
       {:ok, pem} = Salmon.generate_rsa_pem
       info = Map.put(info, "keys", pem)
+      Cachex.del(:user_cache, "ap_id:#{user.ap_id}")
+      Cachex.del(:user_cache, "nickname:#{user.nickname}")
       Repo.update(Ecto.Changeset.change(user, info: info))
     end
   end