Add id, to and cc to Undo for Likes

This commit is contained in:
Bat 2018-06-23 13:19:14 +01:00
parent 135797805e
commit 3ab6dfe288
1 changed files with 6 additions and 2 deletions

View File

@ -50,8 +50,12 @@ impl Like {
diesel::delete(self).execute(conn).unwrap(); diesel::delete(self).execute(conn).unwrap();
let mut act = activity::Undo::default(); let mut act = activity::Undo::default();
act.undo_props.set_actor_link(User::get(conn, self.user_id).unwrap().into_id()).unwrap(); act.undo_props.set_actor_link(User::get(conn, self.user_id).unwrap().into_id()).expect("Like::delete: actor error");
act.undo_props.set_object_object(self.into_activity(conn)).unwrap(); act.undo_props.set_object_object(self.into_activity(conn)).expect("Like::delete: object error");
act.object_props.set_id_string(format!("{}#delete", self.ap_url)).expect("Like::delete: id error");
act.object_props.set_to_link(Id::new(PUBLIC_VISIBILTY.to_string())).expect("Like::delete: to error");
act.object_props.set_cc_link_vec::<Id>(vec![]).expect("Like::delete: cc error");
act act
} }