mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Enforce HS disabling E2EE in DM creation too (Element Pro) (#7292)
This part was missing from the implementation of this Element Pro feature, which incorrectly only applied to rooms.
This commit is contained in:
committed by
GitHub
parent
00dcf48f28
commit
674354b1a6
+2
-2
@@ -430,10 +430,10 @@ class RustMatrixClient(
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun createDM(userId: UserId): Result<RoomId> {
|
||||
override suspend fun createDM(userId: UserId, isEncrypted: Boolean): Result<RoomId> {
|
||||
val createRoomParams = CreateRoomParameters(
|
||||
name = null,
|
||||
isEncrypted = true,
|
||||
isEncrypted = isEncrypted,
|
||||
isDirect = true,
|
||||
visibility = RoomVisibility.Private,
|
||||
preset = RoomPreset.TRUSTED_PRIVATE_CHAT,
|
||||
|
||||
+1
-1
@@ -132,7 +132,7 @@ class RustMatrixClientTest {
|
||||
client = FakeFfiClient(createRoomResult = createRoomLambda)
|
||||
)
|
||||
|
||||
client.createDM(A_USER_ID)
|
||||
client.createDM(userId = A_USER_ID, isEncrypted = true)
|
||||
|
||||
createRoomLambda.assertions().isCalledOnce()
|
||||
assertThat(createParameters?.historyVisibilityOverride).isEqualTo(RoomHistoryVisibility.Invited)
|
||||
|
||||
Reference in New Issue
Block a user