fix: allow trailing slashes for /state/<type>/ again

This commit is contained in:
Timo Kösters 2022-04-01 16:00:04 +02:00
parent f9bf465578
commit a5465dfd3e
No known key found for this signature in database
GPG Key ID: 24DA7517711A2BA4
1 changed files with 16 additions and 0 deletions

View File

@ -273,6 +273,22 @@ fn routes() -> Router {
get(client_server::get_state_events_for_empty_key_route)
.put(client_server::send_state_event_for_empty_key_route),
)
.route(
"/_matrix/client/v3/rooms/:room_id/state/:event_type",
get(client_server::get_state_events_for_empty_key_route)
.put(client_server::send_state_event_for_empty_key_route),
)
// These two endpoints allow trailing slashes
.route(
"/_matrix/client/r0/rooms/:room_id/state/:event_type/",
get(client_server::get_state_events_for_empty_key_route)
.put(client_server::send_state_event_for_empty_key_route),
)
.route(
"/_matrix/client/v3/rooms/:room_id/state/:event_type/",
get(client_server::get_state_events_for_empty_key_route)
.put(client_server::send_state_event_for_empty_key_route),
)
.ruma_route(client_server::sync_events_route)
.ruma_route(client_server::get_context_route)
.ruma_route(client_server::get_message_events_route)