fix: Auto-reply key requests
This commit is contained in:
parent
1652213ab0
commit
0611ea1495
|
|
@ -829,7 +829,7 @@ class KeyManager {
|
||||||
} else if (device.encryptToDevice &&
|
} else if (device.encryptToDevice &&
|
||||||
session.allowedAtIndex
|
session.allowedAtIndex
|
||||||
.tryGet<Map<String, dynamic>>(device.userId)
|
.tryGet<Map<String, dynamic>>(device.userId)
|
||||||
?.tryGet(device.deviceId) !=
|
?.tryGet(device.curve25519Key) !=
|
||||||
null) {
|
null) {
|
||||||
// if we know the user may see the message, then we can just forward the key.
|
// 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,
|
// we do not need to check if the device is verified, just if it is not blocked,
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,8 @@ void main() {
|
||||||
// test a successful foreign share
|
// test a successful foreign share
|
||||||
FakeMatrixApi.calledEndpoints.clear();
|
FakeMatrixApi.calledEndpoints.clear();
|
||||||
session.allowedAtIndex['@test:fakeServer.notExisting'] = <String, int>{
|
session.allowedAtIndex['@test:fakeServer.notExisting'] = <String, int>{
|
||||||
'OTHERDEVICE': 0,
|
matrix.userDeviceKeys['@test:fakeServer.notExisting']
|
||||||
|
.deviceKeys['OTHERDEVICE'].curve25519Key: 0,
|
||||||
};
|
};
|
||||||
event = ToDeviceEvent(
|
event = ToDeviceEvent(
|
||||||
sender: '@test:fakeServer.notExisting',
|
sender: '@test:fakeServer.notExisting',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue