mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-05 12:54:35 +00:00
Parse custom_recovery_passphrase_settings from Element .well-known
Add CustomRecoveryPassphraseRequirements to ElementWellKnown and decode the custom_recovery_passphrase_settings block (currently just min_character_count) from the homeserver's element.json. Invalid specs (missing or non-positive min_character_count) are logged and mapped to null so the setup flow falls back to the generated-key path. Field names match the ESS well-known schema (element-enterprise#261). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+9
@@ -8,6 +8,7 @@
|
||||
|
||||
package io.element.android.features.wellknown.test
|
||||
|
||||
import io.element.android.libraries.wellknown.api.CustomRecoveryPassphraseRequirements
|
||||
import io.element.android.libraries.wellknown.api.ElementWellKnown
|
||||
|
||||
fun anElementWellKnown(
|
||||
@@ -17,6 +18,7 @@ fun anElementWellKnown(
|
||||
brandColor: String? = null,
|
||||
notificationSound: String? = null,
|
||||
identityProviderAppScheme: String? = null,
|
||||
customRecoveryPassphraseRequirements: CustomRecoveryPassphraseRequirements? = null,
|
||||
) = ElementWellKnown(
|
||||
registrationHelperUrl = registrationHelperUrl,
|
||||
enforceElementPro = enforceElementPro,
|
||||
@@ -24,4 +26,11 @@ fun anElementWellKnown(
|
||||
brandColor = brandColor,
|
||||
notificationSound = notificationSound,
|
||||
identityProviderAppScheme = identityProviderAppScheme,
|
||||
customRecoveryPassphraseRequirements = customRecoveryPassphraseRequirements,
|
||||
)
|
||||
|
||||
fun aCustomRecoveryPassphraseRequirements(
|
||||
minCharacterCount: Int = 8,
|
||||
) = CustomRecoveryPassphraseRequirements(
|
||||
minCharacterCount = minCharacterCount,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user