From 8963dab7a45aefa4df80f09c991ddc17a9dd77fa Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 1 Aug 2021 02:06:13 +0300 Subject: [PATCH] message: better error handling in handle_mdn --- src/message.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/message.rs b/src/message.rs index c8a0f6f6e..0a335b2ad 100644 --- a/src/message.rs +++ b/src/message.rs @@ -1689,8 +1689,7 @@ pub async fn handle_mdn( "SELECT COUNT(*) FROM msgs_mdns WHERE msg_id=? AND contact_id=?;", paramsv![msg_id, from_id as i32,], ) - .await - .unwrap_or_default(); + .await?; if !mdn_already_in_table { context @@ -1699,8 +1698,7 @@ pub async fn handle_mdn( "INSERT INTO msgs_mdns (msg_id, contact_id, timestamp_sent) VALUES (?, ?, ?);", paramsv![msg_id, from_id as i32, timestamp_sent], ) - .await - .unwrap_or_default(); // TODO: better error handling + .await?; } // Normal chat? that's quite easy.