1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

mark session as untrusted when the session data has the untrusted flag

This commit is contained in:
Hubert Chathi
2021-07-07 16:16:07 -04:00
parent 558da5528b
commit 9019bce843

View File

@@ -1622,7 +1622,7 @@ MegolmDecryption.prototype._buildKeyForwardingMessage = async function(
*/ */
MegolmDecryption.prototype.importRoomKey = function(session, opts = {}) { MegolmDecryption.prototype.importRoomKey = function(session, opts = {}) {
const extraSessionData = {}; const extraSessionData = {};
if (opts.untrusted) { if (opts.untrusted || session.untrusted) {
extraSessionData.untrusted = true; extraSessionData.untrusted = true;
} }
if (session["org.matrix.msc3061.shared_history"]) { if (session["org.matrix.msc3061.shared_history"]) {