fix: Do not require unrequired field in supported versions response
This commit is contained in:
parent
d116a52ea9
commit
090f0c326c
|
@ -118,7 +118,8 @@ class Encryption {
|
||||||
runInRoot(() => keyVerificationManager.handleEventUpdate(update)));
|
runInRoot(() => keyVerificationManager.handleEventUpdate(update)));
|
||||||
}
|
}
|
||||||
if (update.content['sender'] == client.userID &&
|
if (update.content['sender'] == client.userID &&
|
||||||
!update.content['unsigned'].containsKey('transaction_id')) {
|
(!update.content.containsKey('unsigned') ||
|
||||||
|
!update.content['unsigned'].containsKey('transaction_id'))) {
|
||||||
// maybe we need to re-try SSSS secrets
|
// maybe we need to re-try SSSS secrets
|
||||||
unawaited(runInRoot(() => ssss.periodicallyRequestMissingCache()));
|
unawaited(runInRoot(() => ssss.periodicallyRequestMissingCache()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class SupportedVersions {
|
||||||
|
|
||||||
SupportedVersions.fromJson(Map<String, dynamic> json) {
|
SupportedVersions.fromJson(Map<String, dynamic> json) {
|
||||||
versions = json['versions'].cast<String>();
|
versions = json['versions'].cast<String>();
|
||||||
unstableFeatures = Map<String, bool>.from(json['unstable_features']);
|
unstableFeatures = Map<String, bool>.from(json['unstable_features'] ?? {});
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
|
|
Loading…
Reference in a new issue