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()) }