diff --git a/lib/src/client.dart b/lib/src/client.dart index 549c62b7..6515d131 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -586,7 +586,7 @@ class Client extends MatrixApi { @override Future getWellknown() async { final wellKnownResponse = await httpClient.get( - Uri.https(homeserver.toString(), '/.well-known/matrix/client'), + Uri.https(homeserver!.authority!, '/.well-known/matrix/client'), ); final wellKnown = DiscoveryInformation.fromJson( jsonDecode(utf8.decode(wellKnownResponse.bodyBytes))