Show non-deltachat emails by default for new installations

This commit is contained in:
iequidoo
2023-02-09 22:39:22 -03:00
committed by iequidoo
parent 2a5fa9a0d3
commit 19d7632be0
12 changed files with 25 additions and 96 deletions

View File

@@ -435,7 +435,6 @@ test some special html-characters as < > and & but also " and &#x
async fn test_html_forwarding() {
// alice receives a non-delta html-message
let alice = TestContext::new_alice().await;
alice.set_config(Config::ShowEmails, Some("2")).await.ok();
let chat = alice
.create_chat_with_contact("", "sender@testrun.org")
.await;
@@ -481,10 +480,13 @@ test some special html-characters as < > and & but also " and &#x
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_html_forwarding_encrypted() {
// Alice receives a non-delta html-message
// (`ShowEmails=1` lets Alice actually receive non-delta messages for known contacts,
// the contact is marked as known by creating a chat using `chat_with_contact()`)
// (`ShowEmails=AcceptedContacts` lets Alice actually receive non-delta messages for known
// contacts, the contact is marked as known by creating a chat using `chat_with_contact()`)
let alice = TestContext::new_alice().await;
alice.set_config(Config::ShowEmails, Some("1")).await.ok();
alice
.set_config(Config::ShowEmails, Some("1"))
.await
.unwrap();
let chat = alice
.create_chat_with_contact("", "sender@testrun.org")
.await;
@@ -502,7 +504,10 @@ test some special html-characters as < > and & but also " and &#x
// receive the message on another device
let alice = TestContext::new_alice().await;
assert_eq!(alice.get_config_int(Config::ShowEmails).await.unwrap(), 0); // set to "1" above, make sure it is another db
alice
.set_config(Config::ShowEmails, Some("0"))
.await
.unwrap();
let msg = alice.recv_msg(&msg).await;
assert_eq!(msg.chat_id, alice.get_self_chat().await.id);
assert_eq!(msg.get_from_id(), ContactId::SELF);
@@ -550,7 +555,6 @@ test some special html-characters as < > and & but also " and &#x
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_cp1252_html() -> Result<()> {
let t = TestContext::new_alice().await;
t.set_config(Config::ShowEmails, Some("2")).await?;
receive_imf(
&t,
include_bytes!("../test-data/message/cp1252-html.eml"),