Skip to content
Snippets Groups Projects
Commit 5e880ac4 authored by 🥺's avatar 🥺 :transgender_flag: Committed by 🥺
Browse files

declare various missing server capabilities


this should fix FluffyChat password resets, and
other possible client issues that expose features
based on server capabilities.

Signed-off-by: default avatarstrawberry <strawberry@puppygock.gay>
parent 7f7bd91e
No related branches found
No related tags found
No related merge requests found
use std::collections::BTreeMap;
use ruma::api::client::discovery::get_capabilities::{
self, Capabilities, RoomVersionStability, RoomVersionsCapability,
self, Capabilities, ChangePasswordCapability, RoomVersionStability, RoomVersionsCapability, SetAvatarUrlCapability,
SetDisplayNameCapability, ThirdPartyIdChangesCapability,
};
use crate::{services, Result, Ruma};
/// # `GET /_matrix/client/r0/capabilities`
/// # `GET /_matrix/client/v3/capabilities`
///
/// Get information on the supported feature set and other relevent capabilities
/// of this server.
......@@ -27,6 +28,23 @@ pub async fn get_capabilities_route(
available,
};
capabilities.change_password = ChangePasswordCapability {
enabled: true,
};
capabilities.set_avatar_url = SetAvatarUrlCapability {
enabled: true,
};
capabilities.set_displayname = SetDisplayNameCapability {
enabled: true,
};
// conduit does not implement 3PID stuff
capabilities.thirdparty_id_changes = ThirdPartyIdChangesCapability {
enabled: false,
};
Ok(get_capabilities::v3::Response {
capabilities,
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment