mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 04:46:29 +03:00
message: better error handling in handle_mdn
This commit is contained in:
@@ -1689,8 +1689,7 @@ pub async fn handle_mdn(
|
|||||||
"SELECT COUNT(*) FROM msgs_mdns WHERE msg_id=? AND contact_id=?;",
|
"SELECT COUNT(*) FROM msgs_mdns WHERE msg_id=? AND contact_id=?;",
|
||||||
paramsv![msg_id, from_id as i32,],
|
paramsv![msg_id, from_id as i32,],
|
||||||
)
|
)
|
||||||
.await
|
.await?;
|
||||||
.unwrap_or_default();
|
|
||||||
|
|
||||||
if !mdn_already_in_table {
|
if !mdn_already_in_table {
|
||||||
context
|
context
|
||||||
@@ -1699,8 +1698,7 @@ pub async fn handle_mdn(
|
|||||||
"INSERT INTO msgs_mdns (msg_id, contact_id, timestamp_sent) VALUES (?, ?, ?);",
|
"INSERT INTO msgs_mdns (msg_id, contact_id, timestamp_sent) VALUES (?, ?, ?);",
|
||||||
paramsv![msg_id, from_id as i32, timestamp_sent],
|
paramsv![msg_id, from_id as i32, timestamp_sent],
|
||||||
)
|
)
|
||||||
.await
|
.await?;
|
||||||
.unwrap_or_default(); // TODO: better error handling
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Normal chat? that's quite easy.
|
// Normal chat? that's quite easy.
|
||||||
|
|||||||
Reference in New Issue
Block a user