mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
feat(deltachat-rpc-client): support multiple transports in resetup_account()
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user