Skip to content

Commit

Permalink
chore: use proper matchers in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-famedly committed Dec 14, 2022
1 parent 90e8d5b commit 8c2d7d7
Show file tree
Hide file tree
Showing 3 changed files with 345 additions and 282 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*.swo
*.swn
*.dylib
*.bakmacoscompat
.DS_Store
.atom/
.buildlog/
Expand Down
8 changes: 8 additions & 0 deletions lib/encryption/key_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,14 @@ class KeyManager {
.where((e) => !e.value)
.map((e) => e.key))
: <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);
if (newDeviceIds.isNotEmpty) {
devicesToReceive.addAll(newDeviceKeys.where(
Expand Down
Loading

0 comments on commit 8c2d7d7

Please sign in to comment.