Merge branch 'nico/update-to-spec-1.6' into 'main'

chore: Upgrade to matrix_api_lite 1.6

See merge request famedly/company/frontend/famedlysdk!1267
This commit is contained in:
Nicolas Werner 2023-04-17 11:54:56 +00:00
commit 6f9dde12bf
4 changed files with 7 additions and 9 deletions

View File

@ -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,

View File

@ -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;
}

View File

@ -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

View File

@ -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 {