Skip to content

Commit

Permalink
feat(legacy crypto!): remove {get,set}GlobalErrorOnUnknownDevices
Browse files Browse the repository at this point in the history
`globalErrorOnUnknownDevices` is not used in the rust-crypto. The API is marked as unstable, we can remove it.
  • Loading branch information
florianduros committed Jan 28, 2025
1 parent 8fc29ae commit 04363e4
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1970,41 +1970,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
return this.cryptoBackend;
}

/**
* Set whether sendMessage in a room with unknown and unverified devices
* should throw an error and not send them message. This has 'Global' for
* symmetry with setGlobalBlacklistUnverifiedDevices but there is currently
* no room-level equivalent for this setting.
*
* This API is currently UNSTABLE and may change or be removed without notice.
*
* It has no effect with the Rust crypto implementation.
*
* @param value - whether error on unknown devices
*
* ```ts
* client.getCrypto().globalErrorOnUnknownDevices = value;
* ```
*/
public setGlobalErrorOnUnknownDevices(value: boolean): void {
if (!this.cryptoBackend) {
throw new Error("End-to-end encryption disabled");
}
this.cryptoBackend.globalErrorOnUnknownDevices = value;
}

/**
* @returns whether to error on unknown devices
*
* This API is currently UNSTABLE and may change or be removed without notice.
*/
public getGlobalErrorOnUnknownDevices(): boolean {
if (!this.cryptoBackend) {
throw new Error("End-to-end encryption disabled");
}
return this.cryptoBackend.globalErrorOnUnknownDevices;
}

/**
* Whether encryption is enabled for a room.
* @param roomId - the room id to query.
Expand Down

0 comments on commit 04363e4

Please sign in to comment.