Set primary audience of Delete(Note) activities to Public

This commit is contained in:
silverpill 2022-01-04 21:50:18 +00:00
parent 3e5f5b80d3
commit de1760230a
2 changed files with 2 additions and 11 deletions

View file

@ -343,7 +343,6 @@ pub fn create_activity_undo_announce(
pub fn create_activity_delete_note( pub fn create_activity_delete_note(
instance_url: &str, instance_url: &str,
actor_profile: &DbActorProfile,
post: &Post, post: &Post,
) -> Activity { ) -> Activity {
let object_id = post.get_object_id(instance_url); let object_id = post.get_object_id(instance_url);
@ -354,20 +353,13 @@ pub fn create_activity_delete_note(
former_type: Some(NOTE.to_string()), former_type: Some(NOTE.to_string()),
..Default::default() ..Default::default()
}; };
let mut recipients = vec![AP_PUBLIC.to_string()];
for profile in &post.mentions {
let actor_id = profile.actor_id(instance_url);
if !profile.is_local() {
recipients.push(actor_id);
};
};
let activity = create_activity( let activity = create_activity(
instance_url, instance_url,
&actor_profile.username, &post.author.username,
DELETE, DELETE,
None, None,
object, object,
recipients, vec![AP_PUBLIC.to_string()],
vec![], vec![],
); );
activity activity

View file

@ -147,7 +147,6 @@ async fn delete_status(
let activity = create_activity_delete_note( let activity = create_activity_delete_note(
&config.instance_url(), &config.instance_url(),
&current_user.profile,
&post, &post,
); );
let recipients = get_note_audience(db_client, &current_user, &post).await?; let recipients = get_note_audience(db_client, &current_user, &post).await?;