chore: update to matrix_sdk_lite 0.4.1

This commit is contained in:
Marcus 2021-08-05 12:10:45 +00:00
parent 438f063550
commit f91f662c75
3 changed files with 9 additions and 11 deletions

View File

@ -264,8 +264,7 @@ class OlmManager {
// and generate and upload more if not. // and generate and upload more if not.
// If the server did not send us a count, assume it is 0 // If the server did not send us a count, assume it is 0
final keyCount = final keyCount = countJson?.tryGet<int>('signed_curve25519') ?? 0;
countJson?.tryGet<int>('signed_curve25519', TryGet.optional) ?? 0;
// If the server does not support fallback keys, it will not tell us about them. // If the server does not support fallback keys, it will not tell us about them.
// If the server supports them but has no key, upload a new one. // If the server supports them but has no key, upload a new one.

View File

@ -778,12 +778,11 @@ class FamedlySdkHiveDatabase extends DatabaseApi {
: null; : null;
// calculate the status // calculate the status
final newStatus = final newStatus = eventUpdate.content.tryGet<int>('status') ??
eventUpdate.content.tryGet<int>('status', TryGet.optional) ?? eventUpdate.content
eventUpdate.content .tryGetMap<String, dynamic>('unsigned')
.tryGetMap<String, dynamic>('unsigned', TryGet.optional) ?.tryGet<int>(messageSendingStatusKey) ??
?.tryGet<int>(messageSendingStatusKey, TryGet.optional) ?? 2;
2;
final status = newStatus == -1 || prevEvent?.status == null final status = newStatus == -1 || prevEvent?.status == null
? newStatus ? newStatus
@ -797,8 +796,8 @@ class FamedlySdkHiveDatabase extends DatabaseApi {
// In case this event has sent from this account we have a transaction ID // In case this event has sent from this account we have a transaction ID
final transactionId = eventUpdate.content final transactionId = eventUpdate.content
.tryGetMap<String, dynamic>('unsigned', TryGet.optional) .tryGetMap<String, dynamic>('unsigned')
?.tryGet<String>('transaction_id', TryGet.optional); ?.tryGet<String>('transaction_id');
await _eventsBox.put(MultiKey(eventUpdate.roomID, eventId).toString(), await _eventsBox.put(MultiKey(eventUpdate.roomID, eventId).toString(),
eventUpdate.content); eventUpdate.content);

View File

@ -17,7 +17,7 @@ dependencies:
crypto: ^3.0.0 crypto: ^3.0.0
base58check: ^2.0.0 base58check: ^2.0.0
olm: ^2.0.0 olm: ^2.0.0
matrix_api_lite: ^0.4.0 matrix_api_lite: ^0.4.1
hive: ^2.0.4 hive: ^2.0.4
ffi: ^1.0.0 ffi: ^1.0.0
js: ^0.6.3 js: ^0.6.3