Skip to content

Commit 04363e4

Browse files
committed
feat(legacy crypto!): remove {get,set}GlobalErrorOnUnknownDevices
`globalErrorOnUnknownDevices` is not used in the rust-crypto. The API is marked as unstable, we can remove it.
1 parent 8fc29ae commit 04363e4

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

src/client.ts

-35
Original file line numberDiff line numberDiff line change
@@ -1970,41 +1970,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
19701970
return this.cryptoBackend;
19711971
}
19721972

1973-
/**
1974-
* Set whether sendMessage in a room with unknown and unverified devices
1975-
* should throw an error and not send them message. This has 'Global' for
1976-
* symmetry with setGlobalBlacklistUnverifiedDevices but there is currently
1977-
* no room-level equivalent for this setting.
1978-
*
1979-
* This API is currently UNSTABLE and may change or be removed without notice.
1980-
*
1981-
* It has no effect with the Rust crypto implementation.
1982-
*
1983-
* @param value - whether error on unknown devices
1984-
*
1985-
* ```ts
1986-
* client.getCrypto().globalErrorOnUnknownDevices = value;
1987-
* ```
1988-
*/
1989-
public setGlobalErrorOnUnknownDevices(value: boolean): void {
1990-
if (!this.cryptoBackend) {
1991-
throw new Error("End-to-end encryption disabled");
1992-
}
1993-
this.cryptoBackend.globalErrorOnUnknownDevices = value;
1994-
}
1995-
1996-
/**
1997-
* @returns whether to error on unknown devices
1998-
*
1999-
* This API is currently UNSTABLE and may change or be removed without notice.
2000-
*/
2001-
public getGlobalErrorOnUnknownDevices(): boolean {
2002-
if (!this.cryptoBackend) {
2003-
throw new Error("End-to-end encryption disabled");
2004-
}
2005-
return this.cryptoBackend.globalErrorOnUnknownDevices;
2006-
}
2007-
20081973
/**
20091974
* Whether encryption is enabled for a room.
20101975
* @param roomId - the room id to query.

0 commit comments

Comments
 (0)