Compare commits

..

2 Commits

Author SHA1 Message Date
Ginger e5b11af3e8 fix: Allow cargo_common_metadata clippy lint 2026-01-08 14:00:02 -05:00
Ginger 71a26e433f fix: Update package and crate metadata 2026-01-08 00:21:28 +00:00
3 changed files with 3 additions and 2824 deletions
-1
View File
@@ -1 +0,0 @@
Fixed the whoami endpoint returning HTTP 404 instead of HTTP 403, which confused some appservices. Contributed by @nex.
File diff suppressed because it is too large Load Diff
+3 -9
View File
@@ -724,7 +724,7 @@ pub(crate) async fn change_password_route(
Ok(change_password::v3::Response {})
}
/// # `GET /_matrix/client/v3/account/whoami`
/// # `GET _matrix/client/r0/account/whoami`
///
/// Get `user_id` of the sender user.
///
@@ -733,17 +733,11 @@ pub(crate) async fn whoami_route(
State(services): State<crate::State>,
body: Ruma<whoami::v3::Request>,
) -> Result<whoami::v3::Response> {
let is_guest = services
.users
.is_deactivated(body.sender_user())
.await
.map_err(|_| {
err!(Request(Forbidden("Application service has not registered this user.")))
})? && body.appservice_info.is_none();
Ok(whoami::v3::Response {
user_id: body.sender_user().to_owned(),
device_id: body.sender_device.clone(),
is_guest,
is_guest: services.users.is_deactivated(body.sender_user()).await?
&& body.appservice_info.is_none(),
})
}