Skip to content

Commit 97fcdb2

Browse files
authored
Make the enableEncryptedStateEvents property on MatrixClient public (#5113)
* Make the enableEncryptedStateEvents property on MatrixClient public * fixup! Make the enableEncryptedStateEvents property on MatrixClient public tsdoc for enableEncryptedStateEvents * fixup! Make the enableEncryptedStateEvents property on MatrixClient public Improve the description of enableEncryptedStateEvents
1 parent 31e2d8e commit 97fcdb2

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/client.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,26 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
12171217
public http: MatrixHttpApi<IHttpOpts & { onlyData: true }>; // XXX: Intended private, used in code.
12181218

12191219
private cryptoBackend?: CryptoBackend; // one of crypto or rustCrypto
1220-
private readonly enableEncryptedStateEvents: boolean;
1220+
1221+
/**
1222+
* Support MSC4362: Simplified Encrypted State Events.
1223+
*
1224+
* The client must be recreated for changes to this setting to take effect
1225+
* reliably.
1226+
*
1227+
* When this setting is true, if we find a state event that is encrypted
1228+
* (within a room that supports encrypted state), we will attempt to decrypt
1229+
* it as specified in MSC4362. If the user was in the room at the time an
1230+
* encrypted state event was received (meaning we have the key), even if
1231+
* this setting was set to false at the time it was received, recreating the
1232+
* client with this setting set to true will allow decrypting that event.
1233+
*
1234+
* When this setting is false, any state event that is encrypted will not be
1235+
* decrypted, meaning it will have no effect. This matched the behaviour of
1236+
* a client that does not support MSC4362.
1237+
*/
1238+
public enableEncryptedStateEvents: boolean;
1239+
12211240
public cryptoCallbacks: CryptoCallbacks; // XXX: Intended private, used in code.
12221241
public callEventHandler?: CallEventHandler; // XXX: Intended private, used in code.
12231242
public groupCallEventHandler?: GroupCallEventHandler;

0 commit comments

Comments
 (0)