mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 18:06:35 +03:00
feat: add context to message loading failures
This commit is contained in:
@@ -887,7 +887,11 @@ UPDATE config SET value=? WHERE keyname='configured_addr' AND value!=?1
|
||||
.is_some()
|
||||
{
|
||||
can_info_msg = false;
|
||||
Some(Message::load_from_db(context, insert_msg_id).await?)
|
||||
Some(
|
||||
Message::load_from_db(context, insert_msg_id)
|
||||
.await
|
||||
.context("Failed to load just created webxdc instance")?,
|
||||
)
|
||||
} else if let Some(field) = mime_parser.get_header(HeaderDef::InReplyTo) {
|
||||
if let Some(instance) =
|
||||
message::get_by_rfc724_mids(context, &parse_message_ids(field)).await?
|
||||
@@ -2137,7 +2141,9 @@ async fn add_parts(
|
||||
}
|
||||
|
||||
if let Some(replace_msg_id) = replace_msg_id {
|
||||
let placeholder = Message::load_from_db(context, replace_msg_id).await?;
|
||||
let placeholder = Message::load_from_db(context, replace_msg_id)
|
||||
.await
|
||||
.context("Failed to load placeholder message")?;
|
||||
for key in [
|
||||
Param::WebxdcSummary,
|
||||
Param::WebxdcSummaryTimestamp,
|
||||
|
||||
@@ -389,7 +389,9 @@ impl Context {
|
||||
}
|
||||
|
||||
if let Some(ref href) = status_update_item.href {
|
||||
let mut notify_msg = Message::load_from_db(self, notify_msg_id).await?;
|
||||
let mut notify_msg = Message::load_from_db(self, notify_msg_id)
|
||||
.await
|
||||
.context("Failed to load just created notification message")?;
|
||||
notify_msg.param.set(Param::Arg, href);
|
||||
notify_msg.update_param(self).await?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user