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.
This commit is contained in:
Floris Bruynooghe
2021-02-07 20:47:28 +01:00
parent 6132cc2a42
commit 21e67c79a1

View File

@@ -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;
}
}