let inner_actor = inner_activity.actor()?;
let inner_actor_uri = inner_actor.as_single_xsd_any_uri().unwrap();
- if outer_actor_uri != inner_actor_uri {
- Err(anyhow!("An actor can only undo its own activities").into())
+ if outer_actor_uri.domain() != inner_actor_uri.domain() {
+ Err(anyhow!("Cant undo activities from a different instance").into())
} else {
Ok(())
}
let mod_ = get_user_from_activity(remove, client, pool).await?;
let note = Note::from_any_base(remove.object().to_owned().one().unwrap())?.unwrap();
- let comment_ap_id = CommentForm::from_apub(¬e, client, pool, Some(mod_.actor_id()?))
+ let comment_ap_id = CommentForm::from_apub(¬e, client, pool, None)
.await?
.get_ap_id()?;
let mod_ = get_user_from_activity(remove, client, pool).await?;
let page = PageExt::from_any_base(remove.object().to_owned().one().unwrap())?.unwrap();
- let post_ap_id = PostForm::from_apub(&page, client, pool, Some(mod_.actor_id()?))
+ let post_ap_id = PostForm::from_apub(&page, client, pool, None)
.await?
.get_ap_id()?;
private_key: community.private_key,
public_key: community.public_key,
last_refreshed_at: None,
+ icon: Some(community.icon.to_owned()),
+ banner: Some(community.banner.to_owned()),
};
let community_id = community.id;
private_key: community.private_key,
public_key: community.public_key,
last_refreshed_at: None,
+ icon: Some(community.icon.to_owned()),
+ banner: Some(community.banner.to_owned()),
};
let community_id = community.id;