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
track whether we blacklist unverified devices per-room & globally
This commit is contained in:
@@ -403,6 +403,21 @@ function _setDeviceVerification(client, userId, deviceId, verified, blocked) {
|
||||
client.emit("deviceVerificationChanged", userId, deviceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @param {boolean} value whether to unilaterally blacklist all
|
||||
* unverified devices
|
||||
*/
|
||||
MatrixClient.prototype.setGlobalBlacklistUnverifiedDevices = function(value) {
|
||||
if (this._crypto === null) {
|
||||
throw new Error("End-to-end encryption disabled");
|
||||
}
|
||||
this._crypto.setGlobalBlacklistUnverifiedDevices(value);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get e2e information on the device that sent an event
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user