Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/tests/aeap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ async fn check_aeap_transition(chat_for_transition: ChatForTransition) {
check_that_transition_worked(bob, &groups, alice_contact, ALICE_NEW_ADDR).await;

tcm.section("Test switching back");
tcm.change_addr(alice, "alice@example.org").await;
alice
.set_primary_self_addr("alice@example.org")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i cringe a bit at seeing added "primary" wording after working so long to remove it. Not in this PR but maybe we can rename it to "set_single_self_addr"?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is replaced with TestContext.set_sending_addr() in #8711, better name can be chosen there once it is finished, but most tests should not even need to call it.

.await
.unwrap();
let sent = alice
.send_text(chat_to_send, "Hello from my old addr!")
.await;
Expand Down
4 changes: 2 additions & 2 deletions src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -740,14 +740,14 @@ pub(crate) fn maybe_update_sending_transport(
pub async fn add_pseudo_transport(context: &Context, addr: &str) -> Result<()> {
context.sql
.execute(
"INSERT OR IGNORE INTO transports (addr, entered_param, configured_param) VALUES (?, ?, ?)",
"INSERT INTO transports (addr, entered_param, configured_param) VALUES (?, ?, ?)",
(
addr,
serde_json::to_string(&EnteredLoginParam{addr: addr.to_string(), ..Default::default()})?,
format!(r#"{{"addr":"{addr}","imap":[],"imap_user":"","imap_password":"","smtp":[],"smtp_user":"","smtp_password":"","certificate_checks":"Automatic","oauth2":false}}"#)
),
)
.await?;
.await.with_context(|| format!("Failed to insert pseudo transport for {addr:?}"))?;
Ok(())
}

Expand Down
Loading