From 77a6c67ea6adb8a599f9f521e23c0b374fdca341 Mon Sep 17 00:00:00 2001 From: Brad Murray Date: Wed, 14 Jun 2023 16:24:03 -0400 Subject: [PATCH 1/2] Respect isShareKeysOnInviteEnabled() flag when creating new outbound megolm sessions --- .../android/sdk/internal/crypto/store/db/RealmCryptoStore.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt b/matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt index e3595f66189..bafbcc7808c 100644 --- a/matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt +++ b/matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt @@ -930,7 +930,7 @@ internal class RealmCryptoStore @Inject constructor( val info = realm.createObject(OutboundGroupSessionInfoEntity::class.java).apply { creationTime = clock.epochMillis() // Store the room history visibility on the outbound session creation - shouldShareHistory = entity.shouldShareHistory + shouldShareHistory = isShareKeysOnInviteEnabled() && entity.shouldShareHistory putOutboundGroupSession(outboundGroupSession) } entity.outboundSessionInfo = info From 8553db25e76f118c156af25cb5974a7d061e5119 Mon Sep 17 00:00:00 2001 From: Brad Murray Date: Wed, 14 Jun 2023 17:08:11 -0400 Subject: [PATCH 2/2] Add changelog file --- changelog.d/8540.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/8540.bugfix diff --git a/changelog.d/8540.bugfix b/changelog.d/8540.bugfix new file mode 100644 index 00000000000..7a89922dbdf --- /dev/null +++ b/changelog.d/8540.bugfix @@ -0,0 +1 @@ +Respect isShareKeysOnInviteEnabled() flag when creating new outbound megolm sessions in rooms with history sharing enabled