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:
commit
4bf6a4bcb6
|
@ -1219,6 +1219,7 @@ class Client {
|
||||||
|
|
||||||
Future<void> _updateUserDeviceKeys() async {
|
Future<void> _updateUserDeviceKeys() async {
|
||||||
Set<String> trackedUserIds = await _getUserIdsInEncryptedRooms();
|
Set<String> trackedUserIds = await _getUserIdsInEncryptedRooms();
|
||||||
|
trackedUserIds.add(this.userID);
|
||||||
print("We are tracking the devices of these users:");
|
print("We are tracking the devices of these users:");
|
||||||
print(trackedUserIds);
|
print(trackedUserIds);
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ void main() {
|
||||||
expect(presenceCounter, 1);
|
expect(presenceCounter, 1);
|
||||||
expect(accountDataCounter, 3);
|
expect(accountDataCounter, 3);
|
||||||
await Future.delayed(Duration(milliseconds: 50));
|
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"].outdated, false);
|
||||||
expect(matrix.userDeviceKeys["@alice:example.com"].deviceKeys.length, 1);
|
expect(matrix.userDeviceKeys["@alice:example.com"].deviceKeys.length, 1);
|
||||||
expect(
|
expect(
|
||||||
|
@ -179,7 +179,7 @@ void main() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
await Future.delayed(Duration(milliseconds: 50));
|
await Future.delayed(Duration(milliseconds: 50));
|
||||||
expect(matrix.userDeviceKeys.length, 1);
|
expect(matrix.userDeviceKeys.length, 2);
|
||||||
expect(matrix.userDeviceKeys["@alice:example.com"].outdated, true);
|
expect(matrix.userDeviceKeys["@alice:example.com"].outdated, true);
|
||||||
|
|
||||||
matrix.handleSync({
|
matrix.handleSync({
|
||||||
|
|
Loading…
Reference in a new issue