for cperson in &incorrect_persons {
let keypair = generate_actor_keypair()?;
- let form = PersonUpdateForm::builder()
- .actor_id(Some(generate_local_apub_endpoint(
+ let form = PersonUpdateForm {
+ actor_id: Some(generate_local_apub_endpoint(
EndpointType::Person,
&cperson.name,
protocol_and_hostname,
- )?))
- .private_key(Some(Some(keypair.private_key)))
- .public_key(Some(keypair.public_key))
- .last_refreshed_at(Some(naive_now()))
- .build();
+ )?),
+ private_key: Some(Some(keypair.private_key)),
+ public_key: Some(keypair.public_key),
+ last_refreshed_at: Some(naive_now()),
+ ..Default::default()
+ };
Person::update(pool, cperson.id, &form).await?;
}
protocol_and_hostname,
)?;
- let form = CommunityUpdateForm::builder()
- .actor_id(Some(community_actor_id.clone()))
- .private_key(Some(Some(keypair.private_key)))
- .public_key(Some(keypair.public_key))
- .last_refreshed_at(Some(naive_now()))
- .build();
+ let form = CommunityUpdateForm {
+ actor_id: Some(community_actor_id.clone()),
+ private_key: Some(Some(keypair.private_key)),
+ public_key: Some(keypair.public_key),
+ last_refreshed_at: Some(naive_now()),
+ ..Default::default()
+ };
Community::update(pool, ccommunity.id, &form).await?;
}
Post::update(
pool,
cpost.id,
- &PostUpdateForm::builder().ap_id(Some(apub_id)).build(),
+ &PostUpdateForm {
+ ap_id: Some(apub_id),
+ ..Default::default()
+ },
)
.await?;
}
Comment::update(
pool,
ccomment.id,
- &CommentUpdateForm::builder().ap_id(Some(apub_id)).build(),
+ &CommentUpdateForm {
+ ap_id: Some(apub_id),
+ ..Default::default()
+ },
)
.await?;
}
PrivateMessage::update(
pool,
cpm.id,
- &PrivateMessageUpdateForm::builder()
- .ap_id(Some(apub_id))
- .build(),
+ &PrivateMessageUpdateForm {
+ ap_id: Some(apub_id),
+ ..Default::default()
+ },
)
.await?;
}
}
let key_pair = generate_actor_keypair()?;
let actor_id = Url::parse(protocol_and_hostname)?;
- let site_form = SiteUpdateForm::builder()
- .actor_id(Some(actor_id.clone().into()))
- .last_refreshed_at(Some(naive_now()))
- .inbox_url(Some(generate_site_inbox_url(&actor_id.into())?))
- .private_key(Some(Some(key_pair.private_key)))
- .public_key(Some(key_pair.public_key))
- .build();
+ let site_form = SiteUpdateForm {
+ actor_id: Some(actor_id.clone().into()),
+ last_refreshed_at: Some(naive_now()),
+ inbox_url: Some(generate_site_inbox_url(&actor_id.into())?),
+ private_key: Some(Some(key_pair.private_key)),
+ public_key: Some(key_pair.public_key),
+ ..Default::default()
+ };
Site::update(pool, site.id, &site_form).await?;
}
Ok(())
community_.name
);
let key_pair = generate_actor_keypair()?;
- let form = CommunityUpdateForm::builder()
- .public_key(Some(key_pair.public_key))
- .private_key(Some(Some(key_pair.private_key)))
- .build();
+ let form = CommunityUpdateForm {
+ public_key: Some(key_pair.public_key),
+ private_key: Some(Some(key_pair.private_key)),
+ ..Default::default()
+ };
Community::update(&mut conn.into(), community_.id, &form).await?;
}
}
person_.name
);
let key_pair = generate_actor_keypair()?;
- let form = PersonUpdateForm::builder()
- .public_key(Some(key_pair.public_key))
- .private_key(Some(Some(key_pair.private_key)))
- .build();
+ let form = PersonUpdateForm {
+ public_key: Some(key_pair.public_key),
+ private_key: Some(Some(key_pair.private_key)),
+ ..Default::default()
+ };
Person::update(pool, person_.id, &form).await?;
}
}