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: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
7f7bd91e8a
commit
5e880ac44a
1 changed files with 20 additions and 2 deletions
|
@ -1,12 +1,13 @@
|
|||
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,
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue