Skip to content
Snippets Groups Projects
Commit 66c36778 authored by Taras's avatar Taras
Browse files

Enable key sharing on invite is not supported in rust

parent 39c36c0b
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,8 @@ object MatrixSessionProvider {
private var notificationSetupListener: MatrixNotificationSetupListener? = null
private var onNewAuthLister: (() -> Unit)? = null
fun getSessionOrThrow() = currentSession ?: throw IllegalArgumentException("Session is not created")
fun getSessionOrThrow() =
currentSession ?: throw IllegalArgumentException("Session is not created")
fun initSession(
context: Context,
......@@ -98,7 +99,9 @@ object MatrixSessionProvider {
//For Room history share
private fun enableInviteKeysSharing(session: Session) {
val isEnabled = session.cryptoService().isShareKeysOnInviteEnabled()
if (!isEnabled) session.cryptoService().enableShareKeyOnInvite(true)
tryOrNull {
val isEnabled = session.cryptoService().isShareKeysOnInviteEnabled()
if (!isEnabled) session.cryptoService().enableShareKeyOnInvite(true)
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment