Merge branch 'main' into pat/archive-room-names

This commit is contained in:
Patrick Hettich 2024-03-01 12:03:00 +01:00 committed by GitHub
commit 81f33951bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ extension UiaLogin on Client {
String? user,
AuthenticationData? auth,
String pathVersion = 'v3',
bool? refreshToken,
}) async {
final requestUri = Uri(path: '_matrix/client/$pathVersion/login');
final request = Request('POST', baseUri!.resolveUri(requestUri));
@ -42,6 +43,7 @@ extension UiaLogin on Client {
}[type]!,
if (user != null) 'user': user,
if (auth != null) 'auth': auth.toJson(),
if (refreshToken != null) 'refresh_token': refreshToken,
}));
final response = await httpClient.send(request);
final responseBody = await response.stream.toBytes();