mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
Remove obsolete ChatId::is_unset check
The get_chat_id_by_grpid() call is already resultified. The database can only contain consistent data since on creation it inserts rows for the special chats which do not have a grpid set so can never match. Thus we can safely remove another use of the ChatId::is_unset call which should be removed to clean up the type.
This commit is contained in:
committed by
link2xt
parent
24602ed8a8
commit
d3b66cf724
@@ -1622,13 +1622,11 @@ pub(crate) async fn prefetch_should_download(
|
|||||||
// deleted from the database or has not arrived yet.
|
// deleted from the database or has not arrived yet.
|
||||||
if let Some(rfc724_mid) = headers.get_header_value(HeaderDef::MessageId) {
|
if let Some(rfc724_mid) = headers.get_header_value(HeaderDef::MessageId) {
|
||||||
if let Some(group_id) = dc_extract_grpid_from_rfc724_mid(&rfc724_mid) {
|
if let Some(group_id) = dc_extract_grpid_from_rfc724_mid(&rfc724_mid) {
|
||||||
if let Ok((chat_id, _, _)) = get_chat_id_by_grpid(context, group_id).await {
|
if let Ok((_chat_id, _, _)) = get_chat_id_by_grpid(context, group_id).await {
|
||||||
if !chat_id.is_unset() {
|
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
let maybe_ndn = if let Some(from) = headers.get_header_value(HeaderDef::From_) {
|
let maybe_ndn = if let Some(from) = headers.get_header_value(HeaderDef::From_) {
|
||||||
let from = from.to_ascii_lowercase();
|
let from = from.to_ascii_lowercase();
|
||||||
|
|||||||
Reference in New Issue
Block a user