From 21e67c79a1d77b1215183a0fbe4cb8b91a409b50 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Sun, 7 Feb 2021 20:47:28 +0100 Subject: [PATCH] Remove obsolete ChatId::is_unset check The chat::lookup_by_contact_id call is already resultified, the database can not contain this since the auto-increment counter is bumped to 7 by the time the database tables are created. --- src/job.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/job.rs b/src/job.rs index 26a0ffc61..8d578a46b 100644 --- a/src/job.rs +++ b/src/job.rs @@ -704,14 +704,12 @@ impl Job { match chat.typ { Chattype::Group | Chattype::Mailinglist => { // The next lines are actually what we do in - let (test_normal_chat_id, test_normal_chat_id_blocked) = + let (_test_normal_chat_id, test_normal_chat_id_blocked) = chat::lookup_by_contact_id(context, msg.from_id) .await .unwrap_or_default(); - if !test_normal_chat_id.is_unset() - && test_normal_chat_id_blocked == Blocked::Not - { + if test_normal_chat_id_blocked == Blocked::Not { chat.id.unblock(context).await; } }