Debug logging v2 (#3958)

debug logging
This commit is contained in:
Sebastian Klähn
2023-01-25 14:22:15 +01:00
committed by GitHub
parent c349a5c75b
commit ba860a2b61
15 changed files with 378 additions and 19 deletions

View File

@@ -19,6 +19,7 @@ use crate::contact::{
may_be_valid_addr, normalize_name, Contact, ContactAddress, ContactId, Origin, VerifiedStatus,
};
use crate::context::Context;
use crate::debug_logging::maybe_set_logging_xdc_inner;
use crate::download::DownloadState;
use crate::ephemeral::{stock_ephemeral_timer_changed, Timer as EphemeralTimer};
use crate::events::EventType;
@@ -1230,6 +1231,18 @@ SET rfc724_mid=excluded.rfc724_mid, chat_id=excluded.chat_id,
}
drop(conn);
// check all parts wheter they contain a new logging webxdc
for (part, msg_id) in mime_parser.parts.iter().zip(&created_db_entries) {
maybe_set_logging_xdc_inner(
context,
part.typ,
chat_id,
part.param.get_path(Param::File, context),
*msg_id,
)
.await?;
}
if let Some(replace_msg_id) = replace_msg_id {
// "Replace" placeholder with a message that has no parts.
replace_msg_id.delete_from_db(context).await?;