Merge branch 'client-enhance-get-own-devices' into 'master'

[Client] Always claim own devices

See merge request famedly/famedlysdk!180
This commit is contained in:
Christian Pauly 2020-02-05 08:23:47 +00:00
commit 4bf6a4bcb6
2 changed files with 3 additions and 2 deletions

View file

@ -1219,6 +1219,7 @@ class Client {
Future<void> _updateUserDeviceKeys() async {
Set<String> trackedUserIds = await _getUserIdsInEncryptedRooms();
trackedUserIds.add(this.userID);
print("We are tracking the devices of these users:");
print(trackedUserIds);

View file

@ -160,7 +160,7 @@ void main() {
expect(presenceCounter, 1);
expect(accountDataCounter, 3);
await Future.delayed(Duration(milliseconds: 50));
expect(matrix.userDeviceKeys.length, 1);
expect(matrix.userDeviceKeys.length, 2);
expect(matrix.userDeviceKeys["@alice:example.com"].outdated, false);
expect(matrix.userDeviceKeys["@alice:example.com"].deviceKeys.length, 1);
expect(
@ -179,7 +179,7 @@ void main() {
}
});
await Future.delayed(Duration(milliseconds: 50));
expect(matrix.userDeviceKeys.length, 1);
expect(matrix.userDeviceKeys.length, 2);
expect(matrix.userDeviceKeys["@alice:example.com"].outdated, true);
matrix.handleSync({