mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Lowercase the ap_profile_id of New Local Users and New Local Communties
(to match behaviour for remote users and communities)
This commit is contained in:
parent
e8f7551e06
commit
4ae5b36459
3 changed files with 3 additions and 3 deletions
|
@ -627,7 +627,7 @@ def admin_users_add():
|
||||||
private_key, public_key = RsaKeys.generate_keypair()
|
private_key, public_key = RsaKeys.generate_keypair()
|
||||||
user.private_key = private_key
|
user.private_key = private_key
|
||||||
user.public_key = public_key
|
user.public_key = public_key
|
||||||
user.ap_profile_id = f"https://{current_app.config['SERVER_NAME']}/u/{user.user_name}"
|
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}/inbox"
|
user.ap_inbox_url = f"https://{current_app.config['SERVER_NAME']}/u/{user.user_name}/inbox"
|
||||||
user.roles.append(Role.query.get(form.role.data))
|
user.roles.append(Role.query.get(form.role.data))
|
||||||
|
|
|
@ -49,7 +49,7 @@ def add_local():
|
||||||
rules=form.rules.data, nsfw=form.nsfw.data, private_key=private_key,
|
rules=form.rules.data, nsfw=form.nsfw.data, private_key=private_key,
|
||||||
public_key=public_key, description_html=markdown_to_html(form.description.data),
|
public_key=public_key, description_html=markdown_to_html(form.description.data),
|
||||||
rules_html=markdown_to_html(form.rules.data), local_only=form.local_only.data,
|
rules_html=markdown_to_html(form.rules.data), local_only=form.local_only.data,
|
||||||
ap_profile_id='https://' + current_app.config['SERVER_NAME'] + '/c/' + form.url.data,
|
ap_profile_id='https://' + current_app.config['SERVER_NAME'] + '/c/' + form.url.data.lower(),
|
||||||
ap_followers_url='https://' + current_app.config['SERVER_NAME'] + '/c/' + form.url.data + '/followers',
|
ap_followers_url='https://' + current_app.config['SERVER_NAME'] + '/c/' + form.url.data + '/followers',
|
||||||
ap_domain=current_app.config['SERVER_NAME'],
|
ap_domain=current_app.config['SERVER_NAME'],
|
||||||
subscriptions_count=1, instance_id=1, low_quality='memes' in form.url.data)
|
subscriptions_count=1, instance_id=1, low_quality='memes' in form.url.data)
|
||||||
|
|
|
@ -670,7 +670,7 @@ def finalize_user_setup(user, application_required=False):
|
||||||
private_key, public_key = RsaKeys.generate_keypair()
|
private_key, public_key = RsaKeys.generate_keypair()
|
||||||
user.private_key = private_key
|
user.private_key = private_key
|
||||||
user.public_key = public_key
|
user.public_key = public_key
|
||||||
user.ap_profile_id = f"https://{current_app.config['SERVER_NAME']}/u/{user.user_name}"
|
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}/inbox"
|
user.ap_inbox_url = f"https://{current_app.config['SERVER_NAME']}/u/{user.user_name}/inbox"
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
Loading…
Add table
Reference in a new issue