Fix closing reports not marking the report as closed (#690)

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
Emma Alexia Triphora
2023-08-21 10:43:06 -04:00
committed by GitHub
parent 13e5644c89
commit c85f12fe2c
2 changed files with 25 additions and 0 deletions

View File

@@ -409,6 +409,18 @@ pub async fn report_edit(
)
.execute(&mut *transaction)
.await?;
sqlx::query!(
"
UPDATE threads
SET show_in_mod_inbox = $1
WHERE id = $2
",
!(edit_closed || report.closed),
report.thread_id.0,
)
.execute(&mut *transaction)
.await?;
}
transaction.commit().await?;