From 776cfc9c808af57501f211739fe10352882a4883 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 25 Aug 2026 15:55:51 +0200 Subject: [PATCH] Add new type RoomRetention --- .../element/android/libraries/matrix/api/room/StateEventType.kt | 1 + .../android/libraries/matrix/impl/room/StateEventType.kt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/StateEventType.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/StateEventType.kt index 7bfc5dc6bb..2994683a61 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/StateEventType.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/StateEventType.kt @@ -35,6 +35,7 @@ sealed interface StateEventType { data object RoomImagePack : StateEventType data object RoomLanguage : StateEventType data object RoomPolicy : StateEventType + data object RoomRetention : StateEventType data class Custom(val type: String) : StateEventType } diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/StateEventType.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/StateEventType.kt index 13a040525e..e64eb87570 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/StateEventType.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/StateEventType.kt @@ -39,6 +39,7 @@ fun StateEventType.map(): RustStateEventType = when (this) { StateEventType.RoomImagePack -> RustStateEventType.RoomImagePack StateEventType.RoomLanguage -> RustStateEventType.RoomLanguage StateEventType.RoomPolicy -> RustStateEventType.RoomPolicy + StateEventType.RoomRetention -> RustStateEventType.RoomRetention is StateEventType.Custom -> stateEventTypeFromString(type) } @@ -69,5 +70,6 @@ fun RustStateEventType.map(): StateEventType = when (this) { RustStateEventType.RoomImagePack -> StateEventType.RoomImagePack RustStateEventType.RoomLanguage -> StateEventType.RoomLanguage RustStateEventType.RoomPolicy -> StateEventType.RoomPolicy + RustStateEventType.RoomRetention -> StateEventType.RoomRetention is RustStateEventType.Custom -> StateEventType.Custom(this.toString()) }