You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
[BREAKING] Change the behaviour of the unverfied devices blacklist flag
Previously the global flag was used as a way to completely ignore the per-room option. This commit makes the per-room and global settings be more flexible to allow users to, for example, blacklist unverified devices in all room with the exception of one or two. This is done by making the global setting a device-level default and the per-room option allowing for 3 states: true, false, and unset (use device default). Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
@@ -543,11 +543,10 @@ async function _setDeviceVerification(
|
||||
|
||||
/**
|
||||
* Set the global override for whether the client should ever send encrypted
|
||||
* messages to unverified devices. If false, it can still be overridden
|
||||
* per-room. If true, it overrides the per-room settings.
|
||||
* messages to unverified devices. This provides the default for rooms which
|
||||
* do not specify a value.
|
||||
*
|
||||
* @param {boolean} value whether to unilaterally blacklist all
|
||||
* unverified devices
|
||||
* @param {boolean} value whether to blacklist all unverified devices by default
|
||||
*/
|
||||
MatrixClient.prototype.setGlobalBlacklistUnverifiedDevices = function(value) {
|
||||
if (this._crypto === null) {
|
||||
@@ -557,8 +556,7 @@ MatrixClient.prototype.setGlobalBlacklistUnverifiedDevices = function(value) {
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {boolean} whether to unilaterally blacklist all
|
||||
* unverified devices
|
||||
* @return {boolean} whether to blacklist all unverified devices by default
|
||||
*/
|
||||
MatrixClient.prototype.getGlobalBlacklistUnverifiedDevices = function() {
|
||||
if (this._crypto === null) {
|
||||
|
||||
Reference in New Issue
Block a user