File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1444,9 +1444,10 @@ class MegolmDecryption extends DecryptionAlgorithm {
1444
1444
memberEvent ?. getPrevContent ( ) ?. membership === "invite" ) ;
1445
1445
const fromUs = event . getSender ( ) === this . baseApis . getUserId ( ) ;
1446
1446
1447
- if ( ! weRequested ) {
1448
- // If someone sends us an unsolicited key and it's not
1449
- // shared history, ignore it
1447
+ if ( ! weRequested && ! fromUs ) {
1448
+ // If someone sends us an unsolicited key and they're
1449
+ // not one of our other devices and it's not shared
1450
+ // history, ignore it
1450
1451
if ( ! extraSessionData . sharedHistory ) {
1451
1452
logger . log ( "forwarded key not shared history - ignoring" ) ;
1452
1453
return ;
@@ -1455,7 +1456,7 @@ class MegolmDecryption extends DecryptionAlgorithm {
1455
1456
// If someone sends us an unsolicited key for a room
1456
1457
// we're already in, and they're not one of our other
1457
1458
// devices or the one who invited us, ignore it
1458
- if ( room && ! fromInviter && ! fromUs ) {
1459
+ if ( room && ! fromInviter ) {
1459
1460
logger . log ( "forwarded key not from inviter or from us - ignoring" ) ;
1460
1461
return ;
1461
1462
}
You can’t perform that action at this time.
0 commit comments