feat(deltachat-rpc-client): support multiple transports in resetup_account()

This commit is contained in:
link2xt
2025-10-23 14:08:05 +00:00
committed by l
parent 129137b5de
commit f4938465c3

View File

@@ -73,12 +73,11 @@ class ACFactory:
def resetup_account(self, ac: Account) -> Account: def resetup_account(self, ac: Account) -> Account:
"""Resetup account from scratch, losing the encryption key.""" """Resetup account from scratch, losing the encryption key."""
ac.stop_io() ac.stop_io()
addr = ac.get_config("addr") transports = ac.list_transports()
password = ac.get_config("mail_pw")
ac.remove() ac.remove()
ac_clone = self.get_unconfigured_account() ac_clone = self.get_unconfigured_account()
params = {"addr": addr, "password": password} for transport in transports:
ac_clone.add_or_update_transport(params) ac_clone.add_or_update_transport(transport)
return ac_clone return ac_clone
def get_accepted_chat(self, ac1: Account, ac2: Account) -> Chat: def get_accepted_chat(self, ac1: Account, ac2: Account) -> Chat: