mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Allow homeserver to disable encryption in Element Pro (#7198)
* Allow HS to disable encryption in Element Pro Add `force_disable_e2ee` support in the Element well known retriever and cache to allow a homeserver to disable encrypted room creation and enabling encryption in an existing room in Element Pro clients * Bump enterprise repo back to `main` branch
This commit is contained in:
committed by
GitHub
parent
03f3e8b3e0
commit
62cc7e0505
+2
@@ -46,6 +46,8 @@ data class InternalElementWellKnown(
|
||||
val customRecoveryPassphrase: InternalCustomRecoveryPassphrase? = null,
|
||||
@SerialName("content_scanner_url")
|
||||
val contentScannerUrl: String? = null,
|
||||
@SerialName("force_disable_e2ee")
|
||||
val forceDisableE2EE: Boolean? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
|
||||
+1
@@ -31,6 +31,7 @@ fun InternalElementWellKnown.map() = ElementWellKnown(
|
||||
identityProviderAppScheme = identityProviderAppScheme,
|
||||
customRecoveryPassphrase = customRecoveryPassphrase?.toPublic(),
|
||||
contentScannerUrl = contentScannerUrl,
|
||||
forceDisableE2EE = forceDisableE2EE,
|
||||
)
|
||||
|
||||
private fun InternalCustomRecoveryPassphrase.toPublic(): CustomRecoveryPassphrase {
|
||||
|
||||
+7
-1
@@ -50,6 +50,7 @@ class DefaultSessionWellknownRetrieverTest {
|
||||
identityProviderAppScheme = null,
|
||||
customRecoveryPassphrase = null,
|
||||
contentScannerUrl = null,
|
||||
forceDisableE2EE = null,
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -77,6 +78,7 @@ class DefaultSessionWellknownRetrieverTest {
|
||||
identityProviderAppScheme = "an_app_scheme",
|
||||
customRecoveryPassphrase = null,
|
||||
contentScannerUrl = "https://content-scanner.example.com",
|
||||
forceDisableE2EE = false,
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -108,6 +110,7 @@ class DefaultSessionWellknownRetrieverTest {
|
||||
identityProviderAppScheme = null,
|
||||
contentScannerUrl = null,
|
||||
customRecoveryPassphrase = null,
|
||||
forceDisableE2EE = null,
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -255,6 +258,7 @@ class DefaultSessionWellknownRetrieverTest {
|
||||
identityProviderAppScheme = "an_app_scheme",
|
||||
customRecoveryPassphrase = null,
|
||||
contentScannerUrl = "https://content-scanner.example.com",
|
||||
forceDisableE2EE = false,
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -303,6 +307,7 @@ class DefaultSessionWellknownRetrieverTest {
|
||||
identityProviderAppScheme = "an_app_scheme",
|
||||
customRecoveryPassphrase = null,
|
||||
contentScannerUrl = "https://content-scanner.example.com",
|
||||
forceDisableE2EE = false,
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -340,7 +345,8 @@ class DefaultSessionWellknownRetrieverTest {
|
||||
"brand_color": "#FF0000",
|
||||
"notification_sound": "a_notification_sound.flac",
|
||||
"idp_app_scheme": "an_app_scheme",
|
||||
"content_scanner_url": "https://content-scanner.example.com"
|
||||
"content_scanner_url": "https://content-scanner.example.com",
|
||||
"force_disable_e2ee": false,
|
||||
}"""
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -50,6 +50,7 @@ class DefaultWellknownRetrieverTest {
|
||||
identityProviderAppScheme = null,
|
||||
customRecoveryPassphrase = null,
|
||||
contentScannerUrl = null,
|
||||
forceDisableE2EE = null,
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -72,6 +73,7 @@ class DefaultWellknownRetrieverTest {
|
||||
identityProviderAppScheme = "an_app_scheme",
|
||||
customRecoveryPassphrase = null,
|
||||
contentScannerUrl = "https://content-scanner.example.com",
|
||||
forceDisableE2EE = false,
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -101,6 +103,7 @@ class DefaultWellknownRetrieverTest {
|
||||
identityProviderAppScheme = null,
|
||||
contentScannerUrl = null,
|
||||
customRecoveryPassphrase = null,
|
||||
forceDisableE2EE = null,
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -266,7 +269,8 @@ class DefaultWellknownRetrieverTest {
|
||||
"brand_color": "#FF0000",
|
||||
"notification_sound": "a_notification_sound.flac",
|
||||
"idp_app_scheme": "an_app_scheme",
|
||||
"content_scanner_url": "https://content-scanner.example.com"
|
||||
"content_scanner_url": "https://content-scanner.example.com",
|
||||
"force_disable_e2ee": false
|
||||
}"""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user