From: lain Date: Sat, 24 Feb 2018 17:23:47 +0000 (+0100) Subject: Invalidate user after key creation. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=a7c3ead9e6a18e79e463b54e361baad54b26572c;p=akkoma Invalidate user after key creation. --- diff --git a/lib/pleroma/web/web_finger/web_finger.ex b/lib/pleroma/web/web_finger/web_finger.ex index bbd65da61..3cd849de4 100644 --- a/lib/pleroma/web/web_finger/web_finger.ex +++ b/lib/pleroma/web/web_finger/web_finger.ex @@ -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