Ignore MDNs sent to self

These sometimes arrive happen due to a bug in previous versions of
Delta Chat.
This commit is contained in:
link2xt
2021-09-10 22:41:32 +00:00
parent 1d1491c95d
commit 7745db8310
2 changed files with 81 additions and 0 deletions

View File

@@ -1465,6 +1465,17 @@ pub async fn handle_mdn(
rfc724_mid: &str,
timestamp_sent: i64,
) -> Result<Option<(ChatId, MsgId)>> {
if from_id == DC_CONTACT_ID_SELF {
warn!(
context,
"ignoring MDN sent to self, this is a bug on the sender device"
);
// This is not an error on our side,
// we successfully ignored an invalid MDN and return `Ok`.
return Ok(None);
}
let res = context
.sql
.query_row_optional(