Delete notification on post deletion

This commit is contained in:
Trinity Pointard 2018-10-27 22:17:06 +02:00 committed by Baptiste Gelez
parent 2523f3b523
commit 9d7ae694a8

View File

@ -475,6 +475,9 @@ impl Deletable<Connection, Delete> for Post {
act.object_props.set_id_string(format!("{}#delete", self.ap_url)).expect("Post::delete: id error");
act.object_props.set_to_link_vec(vec![Id::new(PUBLIC_VISIBILTY)]).expect("Post::delete: to error");
for m in Mention::list_for_post(&conn, self.id) {
m.delete(conn);
}
diesel::delete(self).execute(conn).expect("Post::delete: DB error");
act
}