mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
only create keys if they don't have any #225
This commit is contained in:
parent
6424fc07db
commit
10b9f859a9
1 changed files with 4 additions and 3 deletions
|
@ -776,9 +776,10 @@ def finalize_user_setup(user):
|
||||||
from app.activitypub.signature import RsaKeys
|
from app.activitypub.signature import RsaKeys
|
||||||
user.verified = True
|
user.verified = True
|
||||||
user.last_seen = utcnow()
|
user.last_seen = utcnow()
|
||||||
private_key, public_key = RsaKeys.generate_keypair()
|
if user.private_key is None and user.public_key is None:
|
||||||
user.private_key = private_key
|
private_key, public_key = RsaKeys.generate_keypair()
|
||||||
user.public_key = public_key
|
user.private_key = private_key
|
||||||
|
user.public_key = public_key
|
||||||
user.ap_profile_id = f"https://{current_app.config['SERVER_NAME']}/u/{user.user_name}".lower()
|
user.ap_profile_id = f"https://{current_app.config['SERVER_NAME']}/u/{user.user_name}".lower()
|
||||||
user.ap_public_url = f"https://{current_app.config['SERVER_NAME']}/u/{user.user_name}"
|
user.ap_public_url = f"https://{current_app.config['SERVER_NAME']}/u/{user.user_name}"
|
||||||
user.ap_inbox_url = f"https://{current_app.config['SERVER_NAME']}/u/{user.user_name.lower()}/inbox"
|
user.ap_inbox_url = f"https://{current_app.config['SERVER_NAME']}/u/{user.user_name.lower()}/inbox"
|
||||||
|
|
Loading…
Reference in a new issue