Add a developer option for history sharing on invite

Adds a new developer flag, enabling our experimental support for MSC4268.
This commit is contained in:
Richard van der Hoff
2025-06-05 13:34:33 +01:00
committed by Stefan Ceriu
parent db3f9f4d26
commit 394eb008ab
7 changed files with 25 additions and 3 deletions
@@ -42,6 +42,7 @@ protocol DeveloperOptionsProtocol: AnyObject {
var hideUnreadMessagesBadge: Bool { get set }
var fuzzyRoomListSearchEnabled: Bool { get set }
var enableOnlySignedDeviceIsolationMode: Bool { get set }
var enableKeyShareOnInvite: Bool { get set }
var elementCallBaseURLOverride: URL? { get set }
var knockingEnabled: Bool { get set }
var threadsEnabled: Bool { get set }
@@ -75,6 +75,16 @@ struct DeveloperOptionsScreen: View {
Text("This setting controls how end-to-end encryption (E2EE) keys are exchanged. Enabling it will prevent the inclusion of devices that have not been explicitly verified by their owners.")
}
Section {
Toggle(isOn: $context.enableKeyShareOnInvite) {
Text("Share encrypted history with new members")
Text("Requires app reboot")
}
} footer: {
Text("When inviting a user to an encrypted room that has history visibility set to \"shared\", share encrypted history with that user, and accept encrypted history when you are invited to such a room.")
Text("WARNING: this feature is EXPERIMENTAL and not all security precautions are implemented. Do not enable on production accounts.")
}
Section {
TextField("Leave empty to use EC locally", text: $elementCallURLOverrideString)
.autocorrectionDisabled(true)