summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorTimo Kösters <timo@koesters.xyz>2022-10-11 22:37:14 +0200
committerTimo Kösters <timo@koesters.xyz>2022-10-11 23:07:03 +0200
commit2b70d9604a2cb10830a6677c2380374836b4d990 (patch)
treef948d3031a2a2845ab3a55c357642b9bd4566311 /src/main.rs
parentd3968c2fd1d901011e5aaf1dd14cecfed5af10bf (diff)
downloadconduit-2b70d9604a2cb10830a6677c2380374836b4d990.zip
fix: element gets stuck in /initialSync
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index bdbeaa6..0836841 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -342,6 +342,14 @@ fn routes() -> Router {
.ruma_route(server_server::get_profile_information_route)
.ruma_route(server_server::get_keys_route)
.ruma_route(server_server::claim_keys_route)
+ .route(
+ "/_matrix/client/r0/rooms/:room_id/initialSync",
+ get(initial_sync),
+ )
+ .route(
+ "/_matrix/client/v3/rooms/:room_id/initialSync",
+ get(initial_sync),
+ )
.fallback(not_found.into_service())
}
@@ -375,7 +383,11 @@ async fn shutdown_signal(handle: ServerHandle) {
}
async fn not_found(_uri: Uri) -> impl IntoResponse {
- Error::BadRequest(ErrorKind::NotFound, "Unknown or unimplemented route")
+ Error::BadRequest(ErrorKind::Unrecognized, "Unrecognized request")
+}
+
+async fn initial_sync(_uri: Uri) -> impl IntoResponse {
+ Error::BadRequest(ErrorKind::GuestAccessForbidden, "Guest access not implemented")
}
trait RouterExt {