aggregates::structs::PersonAggregates,
source::{
local_user::{LocalUser, LocalUserForm},
+ local_user_language::LocalUserLanguage,
person::{Person, PersonForm},
registration_application::{RegistrationApplication, RegistrationApplicationForm},
site::Site,
name: data.username.to_owned(),
actor_id: Some(actor_id.clone()),
private_key: Some(Some(actor_keypair.private_key)),
- public_key: actor_keypair.public_key,
+ public_key: Some(actor_keypair.public_key),
inbox_url: Some(generate_inbox_url(&actor_id)?),
shared_inbox_url: Some(Some(generate_shared_inbox_url(&actor_id)?)),
admin: Some(no_admins),
}
};
+ // Update the users languages to all by default
+ let local_user_id = inserted_local_user.id;
+ blocking(context.pool(), move |conn| {
+ LocalUserLanguage::update_user_languages(conn, None, local_user_id)
+ })
+ .await??;
+
if require_application {
// Create the registration application
let form = RegistrationApplicationForm {
- local_user_id: Some(inserted_local_user.id),
+ local_user_id: Some(local_user_id),
// We already made sure answer was not null above
answer: data.answer.to_owned(),
..RegistrationApplicationForm::default()
.email
.clone()
.expect("email was provided");
- send_verification_email(
- &local_user_view,
- &email,
- context.pool(),
- &context.settings(),
- )
- .await?;
+ send_verification_email(&local_user_view, &email, context.pool(), context.settings())
+ .await?;
login_response.verify_email_sent = true;
}