enableEncryption

abstract suspend fun enableEncryption(algorithm: String = MXCRYPTO_ALGORITHM_MEGOLM, force: Boolean = false)

Enable encryption of the room.

Parameters

algorithm

the algorithm to set, default to MXCRYPTO_ALGORITHM_MEGOLM

force

Use force to ensure that this algorithm will be used. Otherwise this call will throw if encryption is already setup or if the algorithm is not supported. Only to be used by admins to fix misconfigured encryption.