forked from Nexus/nexus
better login flow
Co-authored-by: Henry-Hiles <henry@henryhiles.com>
This commit is contained in:
parent
621bb74cc9
commit
27dca24889
10 changed files with 292 additions and 328 deletions
|
|
@ -261,12 +261,12 @@ class ClientController extends AsyncNotifier<int> {
|
|||
}
|
||||
}
|
||||
|
||||
Future<String?> discoverHomeserver(Uri homeserver) async {
|
||||
Future<Uri?> discoverHomeserver(Uri homeserver) async {
|
||||
try {
|
||||
final response = await _sendCommand("discover_homeserver", {
|
||||
"user_id": "@fake-user:${homeserver.host}",
|
||||
});
|
||||
return response["m.homeserver"]?["base_url"];
|
||||
return Uri.parse(response["m.homeserver"]?["base_url"]);
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue