Ask for server URL before showing sign in box
Contact the server's .well-known API before anything to get available login flows instead of blindly assuming it will be m.login.password, and to get the server's real URL instead of requiring users to remember that e.g. it's "chat.privacytools.io" and not just "privacytools.io" despite user IDs making it look like so. The server field will also now remember the last accepted URL.
This commit is contained in:
@@ -152,11 +152,13 @@ class MatrixClient(nio.AsyncClient):
|
||||
}
|
||||
|
||||
|
||||
def __init__(self,
|
||||
backend,
|
||||
user: str,
|
||||
homeserver: str = "https://matrix.org",
|
||||
device_id: Optional[str] = None) -> None:
|
||||
def __init__(
|
||||
self,
|
||||
backend,
|
||||
user: str = "",
|
||||
homeserver: str = "https://matrix.org",
|
||||
device_id: Optional[str] = None,
|
||||
) -> None:
|
||||
|
||||
if not urlparse(homeserver).scheme:
|
||||
raise ValueError(
|
||||
|
Reference in New Issue
Block a user