- Ok(c) => c,
- Err(_e) => {
- let default_community_name = "main";
- let actor_id = generate_apub_endpoint(EndpointType::Community, default_community_name)?;
- let community_form = CommunityForm {
- name: default_community_name.to_string(),
- title: "The Default Community".to_string(),
- description: Some("The Default Community".to_string()),
- actor_id: Some(actor_id.to_owned()),
- private_key: Some(main_community_keypair.private_key),
- public_key: Some(main_community_keypair.public_key),
- followers_url: Some(generate_followers_url(&actor_id)?),
- inbox_url: Some(generate_inbox_url(&actor_id)?),
- shared_inbox_url: Some(Some(generate_shared_inbox_url(&actor_id)?)),
- ..CommunityForm::default()
+ login_response.jwt = Some(
+ Claims::jwt(
+ inserted_local_user.id.0,
+ &context.secret().jwt_secret,
+ &context.settings().hostname,
+ )?
+ .into(),
+ );
+ } else {
+ if local_site.require_email_verification {
+ let local_user_view = LocalUserView {
+ local_user: inserted_local_user,
+ person: inserted_person,
+ counts: PersonAggregates::default(),