*,
};
use lemmy_apub::{
- generate_apub_endpoint,
generate_followers_url,
generate_inbox_url,
+ generate_local_apub_endpoint,
generate_shared_inbox_url,
EndpointType,
};
let form = PersonForm {
name: cperson.name.to_owned(),
- actor_id: Some(generate_apub_endpoint(
+ actor_id: Some(generate_local_apub_endpoint(
EndpointType::Person,
&cperson.name,
protocol_and_hostname,
)?),
private_key: Some(Some(keypair.private_key)),
- public_key: Some(Some(keypair.public_key)),
+ public_key: keypair.public_key,
last_refreshed_at: Some(naive_now()),
..PersonForm::default()
};
for ccommunity in &incorrect_communities {
let keypair = generate_actor_keypair()?;
- let community_actor_id = generate_apub_endpoint(
+ let community_actor_id = generate_local_apub_endpoint(
EndpointType::Community,
&ccommunity.name,
protocol_and_hostname,
updated: None,
actor_id: Some(community_actor_id.to_owned()),
local: Some(ccommunity.local),
- private_key: Some(keypair.private_key),
- public_key: Some(keypair.public_key),
+ private_key: Some(Some(keypair.private_key)),
+ public_key: keypair.public_key,
last_refreshed_at: Some(naive_now()),
published: None,
icon: Some(ccommunity.icon.to_owned()),
.load::<Post>(conn)?;
for cpost in &incorrect_posts {
- let apub_id = generate_apub_endpoint(
+ let apub_id = generate_local_apub_endpoint(
EndpointType::Post,
&cpost.id.to_string(),
protocol_and_hostname,
.load::<Comment>(conn)?;
for ccomment in &incorrect_comments {
- let apub_id = generate_apub_endpoint(
+ let apub_id = generate_local_apub_endpoint(
EndpointType::Comment,
&ccomment.id.to_string(),
protocol_and_hostname,
.load::<PrivateMessage>(conn)?;
for cpm in &incorrect_pms {
- let apub_id = generate_apub_endpoint(
+ let apub_id = generate_local_apub_endpoint(
EndpointType::PrivateMessage,
&cpm.id.to_string(),
protocol_and_hostname,