mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-04 06:58:20 +02:00
Feature/4218 wellknown defaults
This commit is contained in:
committed by
Arnfried Griesert
parent
cd2303e446
commit
241d322543
@@ -36,19 +36,21 @@ final class HomeserverConfigurationBuilder: NSObject {
|
||||
vectorWellKnownJitsiConfiguration = self.getJitsiConfiguration(from: vectorWellKnown)
|
||||
}
|
||||
|
||||
// bwi: (#4218) the well-known defaults for bwi are different than the element defaults. E2EE decryption is true instead of false, presharingmode is .whenEnteringRoom instead of .whenTyping and our backup method is only .passphrase instead of all
|
||||
|
||||
// Encryption configuration
|
||||
// Enable E2EE by default when there is no value
|
||||
let isE2EEByDefaultEnabled = vectorWellKnownEncryptionConfiguration?.isE2EEByDefaultEnabled ?? true
|
||||
// Disable mandatory secure backup when there is no value
|
||||
let isSecureBackupRequired = vectorWellKnownEncryptionConfiguration?.isSecureBackupRequired ?? false
|
||||
let isSecureBackupRequired = vectorWellKnownEncryptionConfiguration?.isSecureBackupRequired ?? true
|
||||
// Default to `MXKKeyPreSharingWhenTyping` when there is no value
|
||||
let outboundKeysPreSharingMode = vectorWellKnownEncryptionConfiguration?.outboundKeysPreSharingMode ?? .whenTyping
|
||||
let outboundKeysPreSharingMode = vectorWellKnownEncryptionConfiguration?.outboundKeysPreSharingMode ?? .whenEnteringRoom
|
||||
// Defaults to all secure backup methods available when there is no value
|
||||
let secureBackupSetupMethods: [VectorWellKnownBackupSetupMethod]
|
||||
if let backupSetupMethods = vectorWellKnownEncryptionConfiguration?.secureBackupSetupMethods {
|
||||
secureBackupSetupMethods = backupSetupMethods.isEmpty ? VectorWellKnownBackupSetupMethod.allCases : backupSetupMethods
|
||||
secureBackupSetupMethods = backupSetupMethods.isEmpty ? [.passphrase] : backupSetupMethods
|
||||
} else {
|
||||
secureBackupSetupMethods = VectorWellKnownBackupSetupMethod.allCases
|
||||
secureBackupSetupMethods = [.passphrase]
|
||||
}
|
||||
|
||||
let encryptionConfiguration = HomeserverEncryptionConfiguration(isE2EEByDefaultEnabled: isE2EEByDefaultEnabled,
|
||||
|
||||
Reference in New Issue
Block a user