mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 22:36:30 +03:00
api(deltachat-rpc-client): add Account.add_transport()
This commit is contained in:
@@ -110,6 +110,11 @@ class Account:
|
||||
"""Configure an account."""
|
||||
yield self._rpc.configure.future(self.id)
|
||||
|
||||
@futuremethod
|
||||
def add_transport(self, params):
|
||||
"""Add a new transport."""
|
||||
yield self._rpc.add_transport.future(self.id, params)
|
||||
|
||||
def bring_online(self):
|
||||
"""Start I/O and wait until IMAP becomes IDLE."""
|
||||
self.start_io()
|
||||
|
||||
@@ -34,7 +34,7 @@ class ACFactory:
|
||||
addr, password = self.get_credentials()
|
||||
account = self.get_unconfigured_account()
|
||||
params = {"addr": addr, "password": password}
|
||||
yield account._rpc.add_transport.future(account.id, params)
|
||||
yield account.add_transport.future(params)
|
||||
|
||||
assert account.is_configured()
|
||||
return account
|
||||
|
||||
Reference in New Issue
Block a user