mirror of
https://github.com/chatmail/core.git
synced 2026-05-21 07:46:31 +03:00
WIP: feat: add option to process unencrypted messages
This commit is contained in:
@@ -368,6 +368,7 @@ pub(crate) fn validate_detached_signature<'a, 'b>(
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::config::Config;
|
||||
use crate::receive_imf::receive_imf;
|
||||
use crate::test_utils::TestContext;
|
||||
|
||||
@@ -402,6 +403,8 @@ mod tests {
|
||||
assert!(get_attachment_mime(&mail).is_some());
|
||||
|
||||
let bob = TestContext::new_bob().await;
|
||||
bob.set_config(Config::ProcessUnencrypted, Some("1"))
|
||||
.await?;
|
||||
receive_imf(&bob, attachment_mime, false).await?;
|
||||
let msg = bob.get_last_msg().await;
|
||||
// Subject should be prepended because the attachment doesn't have "Chat-Version".
|
||||
@@ -416,6 +419,8 @@ mod tests {
|
||||
// Desktop via MS Exchange (actually made with TB though).
|
||||
let mixed_up_mime = include_bytes!("../test-data/message/mixed-up-long.eml");
|
||||
let bob = TestContext::new_bob().await;
|
||||
bob.set_config(Config::ProcessUnencrypted, Some("1"))
|
||||
.await?;
|
||||
receive_imf(&bob, mixed_up_mime, false).await?;
|
||||
let msg = bob.get_last_msg().await;
|
||||
assert!(!msg.get_text().is_empty());
|
||||
|
||||
Reference in New Issue
Block a user