mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 22:46: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,10 +1622,8 @@ pub(crate) async fn prefetch_should_download(
|
||||
// deleted from the database or has not arrived yet.
|
||||
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 Ok((chat_id, _, _)) = get_chat_id_by_grpid(context, group_id).await {
|
||||
if !chat_id.is_unset() {
|
||||
return Ok(true);
|
||||
}
|
||||
if let Ok((_chat_id, _, _)) = get_chat_id_by_grpid(context, group_id).await {
|
||||
return Ok(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user