You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
Unexpected ignored self key request when it's not shared history (#2724)
* ignore forwarded key process also if the user is not the same
This commit is contained in:
@@ -1444,9 +1444,10 @@ class MegolmDecryption extends DecryptionAlgorithm {
|
|||||||
memberEvent?.getPrevContent()?.membership === "invite");
|
memberEvent?.getPrevContent()?.membership === "invite");
|
||||||
const fromUs = event.getSender() === this.baseApis.getUserId();
|
const fromUs = event.getSender() === this.baseApis.getUserId();
|
||||||
|
|
||||||
if (!weRequested) {
|
if (!weRequested && !fromUs) {
|
||||||
// If someone sends us an unsolicited key and it's not
|
// If someone sends us an unsolicited key and they're
|
||||||
// shared history, ignore it
|
// not one of our other devices and it's not shared
|
||||||
|
// history, ignore it
|
||||||
if (!extraSessionData.sharedHistory) {
|
if (!extraSessionData.sharedHistory) {
|
||||||
logger.log("forwarded key not shared history - ignoring");
|
logger.log("forwarded key not shared history - ignoring");
|
||||||
return;
|
return;
|
||||||
@@ -1455,7 +1456,7 @@ class MegolmDecryption extends DecryptionAlgorithm {
|
|||||||
// If someone sends us an unsolicited key for a room
|
// If someone sends us an unsolicited key for a room
|
||||||
// we're already in, and they're not one of our other
|
// we're already in, and they're not one of our other
|
||||||
// devices or the one who invited us, ignore it
|
// devices or the one who invited us, ignore it
|
||||||
if (room && !fromInviter && !fromUs) {
|
if (room && !fromInviter) {
|
||||||
logger.log("forwarded key not from inviter or from us - ignoring");
|
logger.log("forwarded key not from inviter or from us - ignoring");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user