From ee51dfcca62e31a432e0874d39f30cad4d7f5750 Mon Sep 17 00:00:00 2001 From: The one with the braid Date: Fri, 16 May 2025 09:44:15 +0200 Subject: [PATCH] fix: fallback on homeserver is userID null Signed-off-by: The one with the braid --- lib/src/client.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index 577c94ef..4cd518fd 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -583,7 +583,10 @@ class Client extends MatrixApi { @override Future getWellknown() async { final wellKnownResponse = await httpClient.get( - Uri.https(userID!.domain!, '/.well-known/matrix/client'), + Uri.https( + userID?.domain ?? homeserver!.host, + '/.well-known/matrix/client', + ), ); final wellKnown = DiscoveryInformation.fromJson( jsonDecode(utf8.decode(wellKnownResponse.bodyBytes))