mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-10-06 01:27:19 +00:00
chore: Update MSC4540 support
This commit is contained in:
@@ -28,6 +28,8 @@ pub(crate) async fn get_capabilities_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<get_capabilities::v3::Request>,
|
||||
) -> Result<get_capabilities::v3::Response> {
|
||||
let sender_user = body.identity.expect_sender_user()?;
|
||||
|
||||
let available: BTreeMap<RoomVersionId, RoomVersionStability> =
|
||||
Server::available_room_versions().collect();
|
||||
|
||||
@@ -46,11 +48,7 @@ pub(crate) async fn get_capabilities_route(
|
||||
|
||||
capabilities.forget_forced_upon_leave.enabled = true;
|
||||
|
||||
if services
|
||||
.users
|
||||
.is_admin(body.identity.expect_sender_user()?)
|
||||
.await
|
||||
{
|
||||
if services.users.is_admin(sender_user).await {
|
||||
capabilities.account_moderation.lock = true;
|
||||
capabilities.account_moderation.suspend = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user