fix: Auto-reply key requests

This commit is contained in:
Sorunome 2021-09-16 21:58:48 +02:00
parent 1652213ab0
commit 0611ea1495
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
2 changed files with 3 additions and 2 deletions

View File

@ -829,7 +829,7 @@ class KeyManager {
} else if (device.encryptToDevice &&
session.allowedAtIndex
.tryGet<Map<String, dynamic>>(device.userId)
?.tryGet(device.deviceId) !=
?.tryGet(device.curve25519Key) !=
null) {
// if we know the user may see the message, then we can just forward the key.
// we do not need to check if the device is verified, just if it is not blocked,

View File

@ -122,7 +122,8 @@ void main() {
// test a successful foreign share
FakeMatrixApi.calledEndpoints.clear();
session.allowedAtIndex['@test:fakeServer.notExisting'] = <String, int>{
'OTHERDEVICE': 0,
matrix.userDeviceKeys['@test:fakeServer.notExisting']
.deviceKeys['OTHERDEVICE'].curve25519Key: 0,
};
event = ToDeviceEvent(
sender: '@test:fakeServer.notExisting',