only create keys if they don't have any #225

This commit is contained in:
rimu 2024-06-26 21:25:40 +08:00
parent 6424fc07db
commit 10b9f859a9

View file

@ -776,6 +776,7 @@ def finalize_user_setup(user):
from app.activitypub.signature import RsaKeys
user.verified = True
user.last_seen = utcnow()
if user.private_key is None and user.public_key is None:
private_key, public_key = RsaKeys.generate_keypair()
user.private_key = private_key
user.public_key = public_key