Disable debug logging if the webxdc message is deleted

This commit is contained in:
Hocuri
2022-05-05 12:38:18 +02:00
committed by Septias
parent e6ae2170a8
commit 0538e68638

View File

@@ -1281,6 +1281,13 @@ pub async fn delete_msgs(context: &Context, msg_ids: &[MsgId]) -> Result<()> {
paramsv![msg.rfc724_mid],
)
.await?;
if context.get_config(Config::DebugLogging).await? == Some(msg_id.to_string()) {
context
.sql
.set_raw_config(Config::DebugLogging, Some("0"))
.await?;
}
}
if !msg_ids.is_empty() {