Merge branch 'krille/refactor-megolm-generator' into 'main'

Krille/refactor megolm generator

See merge request famedly/company/frontend/famedlysdk!1194
This commit is contained in:
Krille 2022-12-14 08:11:33 +00:00
commit 6a1ebf5b24
3 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,6 @@
## [0.15.9] - 14th Dec 2022
- refactor: Key manager megolm handling to make key generation more efficient
## [0.15.8] - 12th Dec 2022 ## [0.15.8] - 12th Dec 2022
- fix: leaved direct chat name (Reza) - fix: leaved direct chat name (Reza)

View File

@ -382,6 +382,14 @@ class KeyManager {
.where((e) => !e.value) .where((e) => !e.value)
.map((e) => e.key)) .map((e) => e.key))
: <String>{}; : <String>{};
// check if a device got removed
if (oldDeviceIds.difference(newDeviceIds).isNotEmpty) {
wipe = true;
break;
}
// check if any new devices need keys
final newDevices = newDeviceIds.difference(oldDeviceIds); final newDevices = newDeviceIds.difference(oldDeviceIds);
if (newDeviceIds.isNotEmpty) { if (newDeviceIds.isNotEmpty) {
devicesToReceive.addAll(newDeviceKeys.where( devicesToReceive.addAll(newDeviceKeys.where(

View File

@ -1,6 +1,6 @@
name: matrix name: matrix
description: Matrix Dart SDK description: Matrix Dart SDK
version: 0.15.8 version: 0.15.9
homepage: https://famedly.com homepage: https://famedly.com
repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git