1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-19 11:29:17 +00:00

Invalidate user after key creation.

This commit is contained in:
lain 2018-02-24 18:23:47 +01:00
parent fb5add56fa
commit a7c3ead9e6

View file

@ -60,6 +60,8 @@ def ensure_keys_present(user) do
else else
{:ok, pem} = Salmon.generate_rsa_pem {:ok, pem} = Salmon.generate_rsa_pem
info = Map.put(info, "keys", 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)) Repo.update(Ecto.Changeset.change(user, info: info))
end end
end end