Skip to content

refactor: stop using deprecated Account.configure()#7339

Merged
link2xt merged 1 commit into
mainfrom
link2xt/luyknokqorvq
Oct 23, 2025
Merged

refactor: stop using deprecated Account.configure()#7339
link2xt merged 1 commit into
mainfrom
link2xt/luyknokqorvq

Conversation

@link2xt
Copy link
Copy Markdown
Collaborator

@link2xt link2xt commented Oct 23, 2025

No description provided.

@link2xt link2xt marked this pull request as ready for review October 23, 2025 09:35
@link2xt link2xt requested review from Hocuri, Simon-Laux, adbenitez and iequidoo and removed request for adbenitez October 23, 2025 09:40
@link2xt link2xt self-assigned this Oct 23, 2025
Comment on lines +76 to +77
addr = ac.get_config("addr")
password = ac.get_config("mail_pw")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

BTW, this could use list_transports(), but it's fine not to do this now

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This code is still in login_param.rs:

    /// Saves entered account settings,
    /// so that they can be prefilled if the user wants to configure the server again.
    pub(crate) async fn save(&self, context: &Context) -> Result<()> {

and it's still needed by UIs until they switch to a list-transports screen, so, I think we'll anyways need to keep these configs for a bit.

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.

Opened #7342

@Simon-Laux
Copy link
Copy Markdown
Member

Simon-Laux commented Oct 23, 2025

should we also do this for bots? https://github.com/deltachat-bot/echo

Ideally we would use add_transport_from_qr in the bots, right?

Or is that something for later, since deleting transports is not supported yet?
would transports to update/delete be identified by their email address?

@link2xt
Copy link
Copy Markdown
Collaborator Author

link2xt commented Oct 23, 2025

configure() is deprecated, so add_transport_from_qr should be used to add the first transport for accounts.

@link2xt link2xt merged commit 89315b8 into main Oct 23, 2025
28 of 29 checks passed
@link2xt link2xt deleted the link2xt/luyknokqorvq branch October 23, 2025 13:41
@Hocuri
Copy link
Copy Markdown
Collaborator

Hocuri commented Oct 23, 2025

Ideally, bots will also use add_transport_from_qr() or add_or_update_transport().

BUT, we will probably need to keep around configure() for quite some time (possibly years) in order not to break all existing bots. So, it's not very urgent; it doesn't matter whether we start transitioning bots now or in a few months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants