mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-26 13:31:02 +00:00
Delete notification on post deletion
This commit is contained in:
parent
2523f3b523
commit
9d7ae694a8
1 changed files with 3 additions and 0 deletions
|
@ -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_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");
|
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");
|
diesel::delete(self).execute(conn).expect("Post::delete: DB error");
|
||||||
act
|
act
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue