diff --git a/CHANGELOG.md b/CHANGELOG.md index 54923ab4..d553a1ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [0.9.2] - 10th May 2022 +- chore: Make path configurable in uiaLogin + ## [0.9.1] - 9th May 2022 - feat: Store timestamp in the presence events - chore: Move auth object passing to external msc implementations diff --git a/lib/msc_extensions/msc_2835_uia_login/msc_2835_uia_login.dart b/lib/msc_extensions/msc_2835_uia_login/msc_2835_uia_login.dart index b036ab2d..e90a858a 100644 --- a/lib/msc_extensions/msc_2835_uia_login/msc_2835_uia_login.dart +++ b/lib/msc_extensions/msc_2835_uia_login/msc_2835_uia_login.dart @@ -8,6 +8,8 @@ import 'package:matrix/matrix.dart'; extension UiaLogin on Client { /// Implementation of MSC2835: /// https://github.com/Sorunome/matrix-doc/blob/soru/uia-on-login/proposals/2835-uia-on-login.md + /// Set `pathVersion` to `r0` if you need to use the previous + /// version of the login endpoint. Future uiaLogin( LoginType type, { String? address, @@ -19,8 +21,9 @@ extension UiaLogin on Client { String? token, String? user, AuthenticationData? auth, + String pathVersion = 'v3', }) async { - final requestUri = Uri(path: '_matrix/client/v3/login'); + final requestUri = Uri(path: '_matrix/client/$pathVersion/login'); final request = Request('POST', baseUri!.resolveUri(requestUri)); request.headers['content-type'] = 'application/json'; request.bodyBytes = utf8.encode(jsonEncode({ diff --git a/pubspec.yaml b/pubspec.yaml index 41e855d7..285e2725 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: matrix description: Matrix Dart SDK -version: 0.9.1 +version: 0.9.2 homepage: https://famedly.com repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git