1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Fix overriding undefined per-room unverified devices setting

If the per-room setting for preventing sending keys to unverified
devices is `undefined`, it overrides the global setting (which
could be `true`).
This commit is contained in:
Luke Barnard
2018-02-22 18:02:39 +00:00
parent 856ef01632
commit 30cb6f196f

View File

@@ -543,7 +543,7 @@ MegolmEncryption.prototype._getDevicesInRoom = function(room) {
// The global value is treated as a default for when rooms don't specify a value.
let isBlacklisting = this._crypto.getGlobalBlacklistUnverifiedDevices();
if (room.getBlacklistUnverifiedDevices() !== null) {
if (typeof room.getBlacklistUnverifiedDevices() === 'boolean') {
isBlacklisting = room.getBlacklistUnverifiedDevices();
}