diff --git a/lib/src/client.dart b/lib/src/client.dart index 8859e5bb..0cfa35cf 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -450,6 +450,7 @@ class Client extends MatrixApi { String? deviceId, String? initialDeviceDisplayName, bool? inhibitLogin, + bool? refreshToken, AuthenticationData? auth, AccountKind? kind, }) async { @@ -496,6 +497,7 @@ class Client extends MatrixApi { String? token, String? deviceId, String? initialDeviceDisplayName, + bool? refreshToken, @Deprecated('Deprecated in favour of identifier.') String? user, @Deprecated('Deprecated in favour of identifier.') String? medium, @Deprecated('Deprecated in favour of identifier.') String? address, @@ -530,11 +532,8 @@ class Client extends MatrixApi { final deviceId_ = response.deviceId; final userId = response.userId; final homeserver_ = homeserver; - if (accessToken == null || - deviceId_ == null || - userId == null || - homeserver_ == null) { - throw Exception('Registered but token, device ID or user ID is null.'); + if (homeserver_ == null) { + throw Exception('Registered but homerserver is null.'); } await init( newToken: accessToken, diff --git a/lib/src/room.dart b/lib/src/room.dart index 691d2962..d64fcd20 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -1315,7 +1315,7 @@ class Room { } await client.setReadMarker( id, - eventId, + mFullyRead: eventId, mRead: mRead, ); return; @@ -1361,7 +1361,6 @@ class Room { id, ReceiptType.mRead, eventId, - {}, ); return; } diff --git a/pubspec.yaml b/pubspec.yaml index 36ec00ec..0e0a1b55 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: image: ^3.1.1 js: ^0.6.3 markdown: ^4.0.0 - matrix_api_lite: ^1.1.8 + matrix_api_lite: ^1.6.0 mime: ^1.0.0 olm: ^2.0.2 random_string: ^2.3.1 diff --git a/test/client_test.dart b/test/client_test.dart index 763e32a2..190b5c3c 100644 --- a/test/client_test.dart +++ b/test/client_test.dart @@ -349,7 +349,7 @@ void main() { identifier: AuthenticationUserIdentifier(user: 'test'), password: '1234'); - expect(loginResp.userId != null, true); + expect(loginResp.userId.isNotEmpty, true); }); test('setAvatar', () async {