mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 12:56:30 +03:00
refactor: flatten peerstate::maybe_do_aeap_transition
This commit is contained in:
@@ -696,7 +696,10 @@ pub(crate) async fn maybe_do_aeap_transition(
|
|||||||
mime_parser: &mut crate::mimeparser::MimeMessage,
|
mime_parser: &mut crate::mimeparser::MimeMessage,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let info = &mime_parser.decryption_info;
|
let info = &mime_parser.decryption_info;
|
||||||
if let Some(peerstate) = &info.peerstate {
|
let Some(peerstate) = &info.peerstate else {
|
||||||
|
return Ok(());
|
||||||
|
};
|
||||||
|
|
||||||
// If the from addr is different from the peerstate address we know,
|
// If the from addr is different from the peerstate address we know,
|
||||||
// we may want to do an AEAP transition.
|
// we may want to do an AEAP transition.
|
||||||
if !addr_cmp(&peerstate.addr, &mime_parser.from.addr)
|
if !addr_cmp(&peerstate.addr, &mime_parser.from.addr)
|
||||||
@@ -734,7 +737,6 @@ pub(crate) async fn maybe_do_aeap_transition(
|
|||||||
|
|
||||||
peerstate.save_to_db(&context.sql).await?;
|
peerstate.save_to_db(&context.sql).await?;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user