chore: deprecate support for unstable room versions

This commit is contained in:
avdb13 2024-07-22 13:38:29 +02:00
parent 91739899e7
commit 00b77144c1
7 changed files with 41 additions and 101 deletions

View file

@ -942,16 +942,7 @@ impl Service {
})? || incoming_pdu.kind
== TimelineEventType::RoomRedaction
&& match room_version_id {
RoomVersionId::V1
| RoomVersionId::V2
| RoomVersionId::V3
| RoomVersionId::V4
| RoomVersionId::V5
| RoomVersionId::V6
| RoomVersionId::V7
| RoomVersionId::V8
| RoomVersionId::V9
| RoomVersionId::V10 => {
room_version if *room_version < RoomVersionId::V11 => {
if let Some(redact_id) = &incoming_pdu.redacts {
!services().rooms.state_accessor.user_can_redact(
redact_id,
@ -985,7 +976,9 @@ impl Service {
}
}
_ => {
unreachable!("Validity of room version already checked")
return Err(Error::BadServerResponse(
"Unsupported room version.",
))
}
};