add: drawings in questions

This commit is contained in:
trisua 2025-06-20 17:40:55 -04:00
parent 6be729de50
commit 16843a6ab8
28 changed files with 1181 additions and 32 deletions

View file

@ -1952,6 +1952,15 @@ impl DataManager {
self.delete_poll(y.poll_id, &user).await?;
}
// delete question (if not global question)
if y.context.answering != 0 {
let question = self.get_question_by_id(y.context.answering).await?;
if !question.is_global {
self.delete_question(question.id, &user).await?;
}
}
// return
Ok(())
}
@ -2031,6 +2040,15 @@ impl DataManager {
for upload in y.uploads {
self.delete_upload(upload).await?;
}
// delete question (if not global question)
if y.context.answering != 0 {
let question = self.get_question_by_id(y.context.answering).await?;
if !question.is_global {
self.delete_question(question.id, &user).await?;
}
}
} else {
// incr parent comment count
if let Some(replying_to) = y.replying_to {