mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 04:46:29 +03:00
feat: allow plain domain in dcaccount: scheme
This is similar to old `dcaccount:` with URL, but creates a 9-character username on the client and avoids making an HTTPS request. The scheme is reused to avoid the apps needing to register for the new scheme. `http` support is removed because it was not working already, there is a check that the scheme is `https` when the URL is actually used and the core has no way to make HTTP requests without TLS.
This commit is contained in:
@@ -45,8 +45,8 @@ class ACFactory:
|
||||
"""Create a new configured account."""
|
||||
addr, password = self.get_credentials()
|
||||
account = self.get_unconfigured_account()
|
||||
params = {"addr": addr, "password": password}
|
||||
yield account.add_or_update_transport.future(params)
|
||||
domain = os.getenv("CHATMAIL_DOMAIN")
|
||||
yield account.add_transport_from_qr.future(f"dcaccount:{domain}")
|
||||
|
||||
assert account.is_configured()
|
||||
return account
|
||||
|
||||
Reference in New Issue
Block a user