Update create.rs

This commit is contained in:
dullbananas 2024-06-11 12:03:29 -07:00 committed by GitHub
parent 00eed9d3c8
commit f456122ecb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,7 +6,6 @@ use lemmy_api_common::{
person::{LoginResponse, Register},
utils::{
generate_inbox_url,
generate_local_apub_endpoint,
generate_shared_inbox_url,
honeypot_check,
local_site_to_slur_regex,
@ -97,11 +96,6 @@ pub async fn register(
let actor_keypair = generate_actor_keypair()?;
is_valid_actor_name(&data.username, local_site.actor_name_max_length as usize)?;
let actor_id = generate_local_apub_endpoint(
EndpointType::Person,
&data.username,
&context.settings().get_protocol_and_hostname(),
)?;
if let Some(email) = &data.email {
if LocalUser::is_email_taken(&mut context.pool(), email).await? {
@ -113,7 +107,6 @@ pub async fn register(
// Register the new person
let person_form = PersonInsertForm {
actor_id: Some(actor_id.clone()),
inbox_url: Some(generate_inbox_url(&actor_id)?),
shared_inbox_url: Some(generate_shared_inbox_url(context.settings())?),
private_key: Some(actor_keypair.private_key),